Set value of Drop Down List

  • 28 October 2013
  • 7 replies
  • 3 views

Badge +8

Hi


I have a view which contains several dropdown controls which allow the users to filter list data.  I would like a button on the view to enable a reset of the filters so when clicked all the dropdowns are reset to blank.  This seems a simple task but I cant seem to find a rule which will do this?  Does anyone have any ideas?


7 replies

Badge +8

Ignore post - I found a solution using the transfer data rule

Badge +4

Can I ask:

 

I cannot use a Transfer data for my scenario.

I have a drop down list and a multi-select list with static values in each.

How would I clear the selected value on change without clearing the values to select from?

 

Regards,

Sam

Userlevel 4
Badge +13

Hi All


 


I have tested the below and it works great.


Instead of using the transfer data rule rather just use the "clear" method.


 


The Clear method is designed to clear controls on a form depending on which controls should be cleared based on the specified configuration in the rule.


 


On a button click event use the "Execute a method on the View" rule and select the clear method from the list of provided options.


Now you can configure which controls should be reset to blank by selecting the checkboxes next to the control in the output mappings.


 


Kind Regards


Raymond

Badge +2

The Clear method will clear the selected value but does NOT clear the contents of the dropdown list. 

Badge +1

Did anyone ever figure a way to reset a drop-down to it's orignal state? As stated above the clear method does not work. One possible soplution that I've thought of but not tried yet is to re-run a populate drop-down rule. Has anyone tried this with success?

Userlevel 4
Badge +13

Hi


 


According to what I can see, this request can be seen from two agles, either:


1) You need to only clear the selection that was made in the dropdown control - in which the previous suggested solution would work.


OR


2) You want to unbind the smartobject bound to the dropdown control rendering the control to the most default state it can be - I do not believe that this is achievable at the moment, this seems as per design as the control is bound to the smartobject as the controls data source during desgin time and cannot be unbound during runtime.


 


Kind Regards,


Raymond


 


 

Badge

I am having the same issue and I see that you used the "transfer data" option to insert blanks into your dropdowns. Do you just check the boxes next to the controls but dont assign a control value to them? or how did you do it? 

 

Reply