Filtering a Dropdown list

  • 7 April 2014
  • 6 replies
  • 19 views

Badge +8

Hi All

 

I have a dropdown list being populated via a SmartObject - the source data is from a SQL table.

 

Now I want to filter the data returned based on a parameter in the SQL table.

Is is possible to send a value to a dropdown list smartobject to achieve this?

 

I can see the option to filter based on another control but that only allows you to select another dropdown which isnt what I'm after.

 

thanks

Paul

 


6 replies

Badge +6

Hi Paul, 


 


Which version of K2 Smartforms are you currently using?


 


Regards,

Badge +8

Hi Taariq 

 

We are not running the latest version (1.0.4 I believe)

 

Since I made the post I managed to get round the issue by using the 'Populate a List Control with Data' rule.  I just wondered if there was any direct method to pass a parameter to a dropdown list smartobject directly.

 

thanks

Paul

Badge +6

Hi Paul,


 


I do believe that the Drop-Down List control can be filtered when configuring the Datasource for the control - this is possible on SmartForms 1.0.4. Also, it is possible to filter Drop-down list 2 based on a value selected by Drop-Down List 1.


 


Regards 

Badge +10

Hi Paul,

 

The way you have it with the populate rule is the correct way.

There is no way to pass a value into the drop-down control, you will need to repopulate the control.

You can set up an OnChange rule on another control and then configure the populate drop-down list control as an action which will re-populate your drop down with the correct values.

 

Hope this helps!

JohanL

Badge +6

Hi,


 


Have you managed to set up a filter for the drop-down list as yet?


 


Regards,

Badge +1

I am guessing this was added in the newer version of SmartForms.  I have only been using K2 for a few months now.

 

In case anyone runs across this thread:

 

You can filter a dropdown in the "populate dropdown list control with data" action, that is in the "When the View executed Initialize" rule 

 

- Click on (configure)

- Click on the Filter button and add your filters

Reply