on 11-10-2014 3:32 PM
Hi Experts
In our dashboard I am filling a dropdown box with some
values from a data source. I us the following script to fill the data.
DROPDOWN_1.setItems(DS_2.getMemberList("ZQMKPI",
MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 100, "No
KPI selected"));
So by default the drop down box will say “No KPI selected”.
Then the user can select a KPI from the dropdown box and everything is fine.
But in some rear cases I would like to set the selected item in the dropdown
box back to “No KPI selected”. How do I do that?
Kind regards
Erik
Hi Eric,
the code should be like this line:
DROPDOWN_1.setSelectedValue("<your value>");
this means, for selecting "all" option,
DROPDOWN_1.setSelectedValue("ALL_MEMBERS"); // ALL_MEMBERS is the key.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Erik,
Have you tried the following?
DROPDOWN_1.setSelectedValue("");
If you check the code generated for the dropdown the "No KPI selected" key will be set to a null blank value. You can use the code above to set it to back to null which should display the corresponding text "No KPI selected".
Thanks.
Erik, this was my typo - also in 1.3 SP1 the brackets are required... This means there was no change.
btw. here the code to see what is the selected key:
APPLICATION.createInfoMessage("Selected Key: \"" + DROPDOWN_1.getSelectedValue() + "\"");
APPLICATION.createInfoMessage("Selected Text: \"" + DROPDOWN_1.getSelectedText() + "\"");
Hello Erik,
I assume you just wanna reset the drop down box and not do any selection on the data source or cube - correct ?
did you try the setSelectedValue option ?
ingo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you fake this by adding a "No KPI selected" to the cube that points to an empty row? That might be the easiest, unless others have suggestions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.