cancel
Showing results for 
Search instead for 
Did you mean: 

Design Studio DROPDOWN_1.setSelectedValue("All") doesn't seem to work

0 Kudos

I am using Design Studio 1.6 SP3. I have a very simple dashboard and am trying to use the to return a drop down to the proper state after a Reset All button is clicked.

The drop down box is populated on startup:

DROPDOWN_2.setItems(DS_1.getMemberList("MU0CUST__0COUNTRY", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 5, "All"));

The Reset All button properly removes all filters and does not produce any errors.

DS_1.clearAllFilters();
DS_2.clearAllFilters();
DROPDOWN_2.setSelectedValue("All");

However, the drop down box remains at its previously selected value.

Here is the screenshot of the DROPDOWN_2 properties. I read somewhere where I had to set a filter property but I have no such filter propery as part of my properties list.

Any suggestions?
Sue

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Agata,

Thank you so much. I spelled MEMBERS incorrectly! I was so excited to test that I didn't verify my code. This works perfectly. Much appreciated.

Sue

Former Member
0 Kudos

Ha ha! Awesome!

Would you mind marking my answer as correct?

0 Kudos

Agata,

That doesn't work. The DROPDOWN still shows the last selected value. This is a very simple dropdown with 3 options - All, Germany and US. If I click on Germany, the data on the graph reflects the correct data. When I then select the Reset button, the data on the graph remove the filter (showing data for both countries). However, DROPDOWN still says Germany. I want it to reflect the data and have it say All.

You can give it a try: http://BW5.ucc.uwm.edu:50000/irj/servlet/prt/portal/prtroot/com.sap.ip.bi.designstudio.nw.portal.ds?...

Thanks,
Sue

0 Kudos

I guess you would need login to try the dashboard - sorry for the unnecessary link!

Former Member
0 Kudos

Sorry for a dumb question but did you type exactly as in my code above? It needs to be exactly ("(ALL_MEMBERS)"). Note the second set of brackets within the "". Also, I note that you use DROPDOWN_2, not 1.

You can test it if you want by adding code to your dropdown box:

APPLICATION.alert(DROPDOWN_2.getSelectedValue());

This will tell you the precise wording of what you need to use for your code. Try selecting Germany and see what the alert is telling you. Then select "All" and see what the alert will tell you (mine is saying: (ALL_MEMBERS)). And whatever it is saying, you need to use it in the code inside the "":

DROPDOWN_1.setSelectedValue("(ALL_MEMBERS)");

Former Member
0 Kudos

Sue,

In your code you should use (ALL_MEMBERS) instead of All:

DROPDOWN_1.setSelectedValue("(ALL_MEMBERS)");

The selected value is not identified as text, but as key.

A.