Skip to Content
avatar image
Former Member

set dropdown default value false in design studio

Hi,

I want to select value of the datasource,so I was use a datasource banding to a dropdown.

And I want to set a default value,like this code:

var d1=APPLICATION.getInfo().dateNowInternalFormat.substring(0,4); DROPDOWN_1.setSelectedValue(d1);

Its should selected default value that the present year,but false.

Anyone can help me?thanks!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 18, 2016 at 08:08 AM

    Hi Jing Zhang,

    When binding the dimension to dropdown. There will be property as follow filter state,if it is given value as true your code will not work.So you make it false then your code will work.

    Because follow filter state allow the dropdown to capture filter value of assigned data source and make it selected. It ignores Setselectedvalue() function.

    Thanks,

    Poovarasan

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 21, 2017 at 12:27 PM

    I am not able to find the Follow Filter State option. I am running Design Studio 1.6 SP3. Any suggestions?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Sue McFarland Metzger

      Hi Sue.

      In this situation,maby your question isn't related to mine.If you just need to reset the dropdown selectvalue changed when you click Reset All button,you should do like this:on your Reset All button,you just need add follow code :dropdown.setselectvalue("ALL");DS_1.clearfilter("XX").

      Regards.

      Jing