cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt values need to be display in text box

Former Member
0 Kudos

Hi

I am new to design studio. I am trying to display the prompt vales in text box. which ever we selected values in prompt that need to be displayed in the text box . I am using script

APPLICATION.openPromptDialog(400, 400);

DS_1.loadDataSource();

TEXT_34.setText(DS_1.getVariableValueExt(.........));

please help me to fix the issue.

Thanks,

Regards,

Sudarsan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sudarsan,

I'm not clear about your requirements exactly, but if you're looking at getting the text box updated depending on the selection made on the dropdown, you can also use the following code as an alternative:

TEXT_36.setText(DROPDOWN_1.getSelectedText());

This is assuming that you have set the name of the dropdown as "DROPDOWN_1". The code is to be placed within the onSelect event of the dropdown box. Please check to see if this updates your text box accordingly.

Thanks and Regards,

Eshwar Prasanna

Former Member
0 Kudos

Hi Eshwar,

Yup, i nned to display the dropdown selection on the text box. I will try with this code. If you have any documents about scripting plz share with me.

Thanks and Regards,

Sud

Former Member
0 Kudos

Hi Sudarsan,

Design Studio itself offers a host of content assistance features that makes scripting extremely easy on the tool. At any point, you can use Ctrl+Space within the script window to get scripting suggestions and scripting help.

Thanks and Regards,

Eshwar Prasanna

Former Member
0 Kudos

Thank you so much for your reply  Eshwar. Now we are trying to make our preference to local . Every thing we followed changed properties as per the document.  After changing in to local i am unable to see my previous applications. And thank you so much, That prompt display is working for dropdown.

Thanks and Regards,

Sud

Former Member
0 Kudos

How can i give this got answered by u in this blog.

Former Member
0 Kudos

Hi Sud,

You should be able to find an option named "Correct Answer" in any of the posts that others have made in the thread you have started.

Please refer to the link below:

http://scn.sap.com/community/support/blog/2013/04/03/how-to-close-a-discussion-and-why

Thanks and Regards,

Eshwar

Former Member
0 Kudos

Hi Eshwar,

If i have 10 drop down boxes here i want to display all the texts in the same text box. text1.settext( dropdwn_1.getselectedtext() + dropdwnd_2.getselectedtext()); is not working.

i thing i need to create diff text boxes for each dropdown.

Thanks and Regards,

Sud.

Former Member
0 Kudos

Hi Sud,

Creating 10 different text boxes will not be necessary. You can create just one text box and do the following:

  1. Create a button (BUTTON_1) and set its visibility to hidden. Place it in any corner of the dashboard. Inside the button, use the following code:
    1. 
      

      TEXT_1.setText("Prompt 1: "+DROPDOWN_1.getSelectedText()+" Prompt 2: "+DROPDOWN_2.getSelectedText()+...); //Modify code for as many dropdowns as neede

  2. Inside all of your dropdowns, use the following syntax:
    1. BUTTON_1.onClick();

This should help update your text box each time one of the dropdowns pass a value.

Thanks and Regards,

Eshwar Prasanna

Former Member
0 Kudos

Thanks for your great response. Yeah , if we put button we need to click to get the text on report side,dnt we?

Former Member
0 Kudos

Not necessary. The button is going to be hidden. You will be calling the onClick() event of the button within each of the dropdown menus. This means that each time you select a value within any of the dropdowns, the onClick event of the button is executed.

Former Member
0 Kudos

Thank you so much. Its working good.

Thanks & Regards,

Sud.

Former Member
0 Kudos

Now i created local mode. But when i tried to open  "open repository folder  " in Application menu, i unable to see my saved applications. i followed the document and made this local mode. Any alternative for this?

Thanks & Regards,

Sud.

Former Member
0 Kudos

Hi Sud,

Can you navigate to the following location to check if your applications are available in them:

C:\Users\<your username>\Analysis-workspace\com.sap.ip.bi.zen\repository

Each application that you create should be available under its own folder inside the repository. Also, cross check to see whether you have been creating applications on the local mode. You can check under Tools -> Preferences and check to see what is your startup mode.

Thanks and Regards,

Eshwar Prasanna

Former Member
0 Kudos

Hi Eshwar,

Ya i did the same by following document which i pasted below. i am unable to follow the 5 th step. have a look on pasted doc below,please.

Steps for downloading the design studio dashboard to local system.

  1. 1. Launch Design Studio and connect to server

  1. 2. Goto Help->Support->Download Application

  

  1. 3. Browse to the design studio file which you want to download and click Download and save to your local system

  

  1. 4. Browse to the save folder and open the “content.biapp” file with text editor

Replace “cuid:M1J5MH0AANMAANkAhgAAXroAAgrEoCgAAAA” with “01.05 BWP”

  

Please note: In your case the cuid might be different and please change to the BW system to which you want to connect.

Like if you want to connect to BWD, then it should be “03.05 BWD”. This is as in sap logon pad.

  1. 5. Replace “Root Folder/SBU Specific/HLS/Finance/Supporting Documents/” with “”.

  1. 6. Create a folder with your ds name and save under repository folder in your local system i.e. “C:\Users\<user.domain>\Analysis-workspace\com.sap.ip.bi.zen\repository” and save this edited content.biapp file in this newly created folder. Also save your css file and all images which you have used or want to use in the dashboard.

  1. 7. Now you need to logon to design studio in local mode and you can access this locally saved dashboard to work on it.

Thanks & Regards,

Sud.

Former Member
0 Kudos

C:\Users\user.domain\Analysis-workspace\com.sap.ip.bi.zen\repository\bip_temp


this is the path i mentioned in preference

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sudarsan,

Can you try to use below code. It may solve your issue.

TEXT_34.setText(DS_1.getStaticFilterText("..."));

or

TEXT_34.setText(DS_1.getFilterText("..."));

Thanks & regards,

Suresh

Former Member
0 Kudos

Hi Suresh,

Thanks for reply. I tried with this but after using this script also nothing is showing in the text box. Here i am trying to display the prompt. Now using this  http://scn.sap.com/docs/DOC-41393) i got prompts to Button component. Now i can get data from that component,dnt i??

Former Member
0 Kudos

After you invoked the prompt dialog box using the button, I suggest that you use another button to set the value of the text box. The code to be given to the button is:


TEXT_1.setText(DS_1.getVariableValueText("VAR_CALENDARYEAR"));

I have tried this using a HANA data source and it works.

If you are trying to set the text box text with the variable value within the same component in which you are invoking the prompt dialog box, it will not work the first time around - it will only set the value in the text box after you hit the component a second time, and the text box will only be set with the value that was selected the previous time that the dialog was opened.

Thanks and Regards,

Eshwar

Former Member
0 Kudos

Hi,

Then which code we can use in text box event?.

Former Member
0 Kudos

You will not need to use a code in the text box event. Alternatively, you can also place the above code inside the text box itself. That way, users can click directly on the text box to refresh values.

Thanks and Regards,

Eshwar Prasanna

Former Member
0 Kudos

Thank you.:) I will try.

Former Member
0 Kudos

Hi Eshwar i tried it but i am getting one promt only. i tried like

TEXT_34.setText(DS_1.getVariableValueText("prmpt1"));

TEXT_34.setText(DS_1.getVariableValueText("prmpt2"));

TEXT_34.setText(DS_1.getVariableValueText("prmpt3"));

in the same same event . but its is not working.

Regards,

Sudarsan.

Former Member
0 Kudos

Hi Sudarsan,

Since you're using 3 different statements, each prompt value is getting overwritten by the next. If you want to concatenate the prompts, you may want to try a different option. Try using the following code - it will concatenate each of the prompts:


TEXT_34.setText("Prompt 1: "+DS_1.getVariableValueText("<PROMPT 1>")+" | Prompt 2: "+DS_1.getVariableValueText("<PROMPT 2>")+" | Prompt 2: "+DS_1.getVariableValueText("<PROMPT 2>"));

Be sure to replace <PROMPT 1>, <PROMPT 2> and <PROMPT 3> and also increase the width of the text box to accomodate the whole text.

Another option you could use is try using 3 different text boxes and setting a prompt value in each of them.

I hope this helps.

Thanks and Regards,

Eshwar Prasanna

Former Member
0 Kudos

Thank you so much Eshwar. Its working.

Thanks and Regards,

Sud.

Former Member
0 Kudos

Hi Eshwar i am getting Bex Propmts now. Here i used dropdown boxs. After giving the selection in multiple prompts in dropdown box  ,that prompts need to be shown  in  the text box. As u said before i am getting mandatory BEex prompt in text. now iam trying for this Dropdown selections .

Thabks and Regards,

Sudarsan.

Former Member
0 Kudos

Hi Sudarsan,

You can use the code to update the text box within the dropdown box's onSelect event. This should still be able to update the text box every time you pass a value to the prompt using the dropdown.

Also, if you've found an answer helpful or correct, please mark the answer - it will users from identifying the correct answer on the thread.

Thanks and Regards,

Eshwar Prasanna

Former Member
0 Kudos

Hi Eshwar,

I tried like that but still its blank. i wrote script like " TEXT_36.setText(DS_1.getVariableValueText("prmt")); " in drop box and the same script i put in textbox on click. but it showing blank.

Thanks and Regards,

Sud.

Former Member
0 Kudos

Hi Sudarsan,

Have you checked if the variable value has actually been passed? You can do this by putting up a crosstab/chart and checking whether the value for the data has changed when you pass the variable value from the dropdown.

Also, it would be more helpful if you could provide a screenshot of your outline view, the exact script you have given in the dropdown and the exact technical name of the variable to which you are passing a value using the dropdown.

Thanks and Regards,

Eshwar Prasanna

Former Member
0 Kudos

Hi Eshwer,

Dropdown is working properly for charts. Charts are changing as per dropdown script. But i coudn't able to see the selected dropdown variable on the text box. Right now i am out of my computer so i cant share the screen shot. I wrote TEXT_36.setText(DS_1.getVariableValueText("prmt"))  this code for bex prompts its working properly. But when i applied same code for dropdown component, it is nt working.

Thanks and Regards,

Sud.

Former Member
0 Kudos

Hi Sudarsan,

If you are using the the code you have given inside the same component event window, the text box will only be set with the value of the variable you have chosen when you click on that component the second time. It would be ideal to trigger the "APPLICATION.openPromptDialog()", and then use the line "TEXT_34.setText(...)" in another component's events.

For instance, you could use a button to open the prompt dialog box, and then use a different button to set the value of the text box.

If my understanding of your issue has not been accurate, it would help if you posted a screenshot or rephrase your problem.


Thanks and Regards,

Eshwar