Skip to Content

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

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

capture.png (18.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Mar 21, 2017 at 03:17 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 21, 2017 at 03:45 PM

    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?APPLICATION=SM1DB1090

    Thanks,
    Sue

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sue McFarland Metzger

      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)");

  • Mar 21, 2017 at 05:29 PM

    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

    Add comment
    10|10000 characters needed characters exceeded