cancel
Showing results for 
Search instead for 
Did you mean: 

set dropdown default value false in design studio

former_member241445
Participant
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

former_member265529
Contributor

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

former_member241445
Participant

hey,Poovarasan Boopalan.

I don't know how to express my thanks.This is a very important detail ,and it's easy to ignore.

Thanks,

Jing

arpangupta
Explorer
0 Kudos

Hi Poovarasan / Jiing

Where I can search for this property ? i am not able to locate it.

Regards,

Arpan

former_member241445
Participant
0 Kudos

Hello Arpan.

select the dropdown component,and you will see this picture.

Regards.

Jing

Answers (1)

Answers (1)

0 Kudos

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

0 Kudos

Sorry for not being more specific. I am trying to use the DROPDOWN_2.setSelectedValue("All") to return my drop down to the proper state after a Reset All button is clicked. The Reset All properly removes all filters and does not complain about the setSelectedValue() command but the dropdown box remains at its previously selected value. Here is the screenshot of the DROPDOWN_2 properties.

Thanks,
Sue

capture.png

MustafaBensan
Active Contributor
0 Kudos

Sue,

Since this is now a closed (answered) question, as per the SCN Rules of Engagement, please post a new question describing your issue. This will also ensure it is more visible.

Regards,

Mustafa.

Thanks for advice. I don't get on here much ... a professor and not a "real" end-user!

former_member241445
Participant
0 Kudos

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