How to cascade/filter \simple\" choice fields?"

  • 24 October 2016
  • 7 replies
  • 6 views

Badge +7

I have a pretty simple form with two choice fields visualized as drop downs.

After the user selects a value in the first drop down, the values in the second must be filtered to show only relevant choices given the value in the first drop down.

The underlying columns are of type "Choice" and NOT "Lookup".

How can I make the dropdowns have a cascading effect?

Regards

Leif


7 replies

Badge +9

Hi,

Check this for details https://community.nintex.com/docs/DOC-1646 .I guess it wont be possible unless 2nd column is a lookup.

cascading‌

Badge +7

Hi,

 

Yep already saw this – but it is based on lookup fields, not simple choice fields. When using simple choice fields, the filtering options do not appear.

/Leif

Userlevel 5
Badge +14

if you have reasonable amount of options in first dropdown, you can design as many 2nd level dropdowns as options of 1st dropdown.

then using rules show/hide 2nd level dropdowns by value of 1st dropdown

Badge +7

Hi Marian,

Yes that could be a way to go forward. But that will leave me with a problem of getting the selected vale from dropdown two back into the underlying Sharepoint column. As soon as I mark a dropdown control as connected to the Sharepoint column, it will present the options that are defined in the Sharepoint column, and thus, all the variants of dropdown two (2nd level dropdown) will be the same.

/Leif

Userlevel 5
Badge +14

that's true, but that's how it is designed.


you need not to connect 2nd level dropdowns to item field. you can create calc value control that will pick valid value out of these dropdowns and connect it to item's field.

if you do not need to change dropdowns in edit mode, you can show just that calc value control then.

if you need to change dropdowns even in edit mode that you will have to write some javascript code that will set active dropdown value based of that from calc control resp item's field value.

you should understand choice control is not suitable for cascading at all.

in order you could make automatic filtering (cascading) you need key+value pairs. you select a value (with a key behind) in first dropdown and second one filters just values with the same key value as selected in first dropdown.

choice control holds only values, so you have no other info what values group together.

Badge +3

Hi Leif,

I figure you are hesitant using list lookups. I have found list lookups extremely valuable in filtering the possibilities. By simply adding a column or even a view to your lookup list you can design your form to be quite versatile.

I think the answer provided by Chris Ben is worth looking into. I used his answer to configure a filter for an extremely long work order list by the associated business unit. The user would first select the appropriate Business Unit. Then they would only have the appropriate choices from the work order list to choose from. This was very simple to implement.

https://community.nintex.com/thread/11259#comment-36767

I hope this helps. It doesn't take too long to set up, especially if you already know your choices and the associated "filtering" term.

Badge +7

Hi Vickie,

I have now ended up with making the "normal" solution where my choices live in lists and I can use Nintex' filtering options for this. Of course this works fine. Still I cannot help but wonder why Nintex does not provide some way to make filtering possible on "hardcoded" choice drop downs. I was converting a form from Infopath, and in that form, the choices were coded into the form, and that was a nice and quick soultion to a super simple business case.

Thank you all for your input on this.

Regards

Leif

Reply