Solved

Dropdown cascading lookup with 2 filters fields !!

  • 21 April 2017
  • 3 replies
  • 235 views

Hi Community;

any idea how can i achieve this in O365 !

I have a country to select, then same services for both countries, then based on country selected and service selected, i have to filter documents needed.

 

 

 

202085_pastedImage_1.png

Thank you for your help in advance;

Ahmed

icon

Best answer by jpmhuls 24 April 2017, 08:35

View original

3 replies

Userlevel 5
Badge +13

You will need to use the parseLookup function in the runtime functions I believe.

See here some hopefully helpful links

I cannot get nested lookups working in forms 

Filter a Form List Lookup control by multiple previous controls values 

 

Userlevel 2
Badge +11

The parselookup only extracts the display value from a lookup selection. From my experience I would use one of the following options:

  1. In the documents library create a calculated column (or a single line of text field to be filled by a workflow) that combines the Country and Service Type, e.g. separated by a unique separator (#, _, - or a combination of characters). In your form you do the same with the selected Country and Service Type which you puy in a hidden (use a rule!!) single line of text field. Use this hidden text field's value to filter the list lookup dropdown using a control's value filter option.
  2. As you seem to have only 4 combinations, you could resolve this with 4 views on the Documents view and 4 lookup controls. The 4 views are filtered according to each of the 4 scenarios. The lookup controls each use one of the 4 library views and are hidden if the selected Country and Service Type are not matching the scenario.
  3. Use Custom JavaScript in the Form settings: in NWF$(document).ready you add .change() for both Country and Service type which update/construct a CAML query which you can use to populate the Documents Needed list lookup control. I've used a similar approach to allow users to copy metadata from a selected document; here I use 4 filters to reduce the number of documents to select from using the just mentioned method and a button to read and copy the metadata from the selected document (5th lookup).

There's a request to get a list lookup control with more than 1 filter; hopefully in a future version Nintex will implement this.

Hopefully one of the above works for you.

Thank you Jean-Pierre, i have used the first option, it works for me. just want to add the code so it will be easier for others 

Hidden Calculated value formula : ctlCountry+"_" +parseLookup(ctlServiceType1)

Document needed : Calculated value formula : lookup("ReqService2", "Country_SVC",ctlCountySvc, "Requirement")

Thank you

Ahmed

Reply