cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

set cascading lookup filter based on the value of a choice field

I'm attempting to set the value of the below cascading lookup field based on a choice field in the below form to request approval to travel.

 

I have set-up the below section of the form using cascading lookups to filter the list of cities when a country is selected for both Departure and Destination. 

 

Forms_DestinationLookupIntDuplicate.png

 

My issues started when I attempted to

a) Prevent the selection of identical countries when Flight Type = International 

 

Forms_DestinationLookup.png

 

 

b) Set and disable the Destination country when Flight Type = Domestic. I am unable to filter the Destination country using rules or by calculated values, and I created a new field for the domestic city which is conditionally hidden based on Flight Type however when hiding fields on this form, field layout went a little haywire.

 

Forms_DestinationLookup_Domestic.png

 

c) I also need to prevent the date of departure being set to prior to the current date, also when add new row is selected It would be useful to set the date to the previous date of departure + 1

 

however I believe this is achievable using custom javascript although  I am familiar with JavaScript I wouldn't class myself as able to write anything even close to accomplishing this requirement.

 

This is a complex form with many sections which I really need assistance with.

Thanks

Chet

 

Labels: (1)
0 Kudos
Reply
4 Replies
Highlighted
Nintex Newbie

Re: set cascading lookup filter based on the value of a choice field

Custom javascript would probably help with this. Also we are releasing a new responsive forms which has some nice form rules that may make this easier. You can connect with @EuanGamble for more info on the new responsive forms.

 

Regarding your immediate issues, I would possibly pivot the data for input slightly differently.

I would set up the selection by highest tier first, which may be flight type. This would mean setting up a panel with repeating sections that include the correct options.

 

A. It seems that domestic/international drives everything else so I would have the user select that first. If international, then you have the cascading for country setup as it should be where country cannot equal the same or whatever you have there. If they choose Domestic, a completely different panel with repeating sections show with the correct options showing. It's not that your rules aren't working but it could be that something is conflicting and just unknown.

 

B. For this, use a rule to disable destination city if flight type is domestic. Then use a workflow to set the destination city = departure city if it is domestic. I would almost recommend flipping this to Responsive forms as you have the ability to use a new rule type which is "set field value" which could help make that easy.

 

C. This is a bit tricky to achieve because it would require javascript to do that. If you aren't familiar with javascript then I would recommend avoiding it. Again, the new responsive form designer that is available in O365 does have formula builder that you can use to create date validation.

 

Hope that helps.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: set cascading lookup filter based on the value of a choice field

Hey thanks for the response,

I added a couple more posts that depend on these selections so appreciate your help, I tried using the responsive layout but the limit of 4 columns prevented me from adding the Expense Claim table

 

Forms_PerDiemdate.pngUnless we can now achieve this using the responsive layout

0 Kudos
Reply
Highlighted
Nintex Employee
Nintex Employee

Re: set cascading lookup filter based on the value of a choice field

Hi @ChetChudasamaTS 

 

Regarding C: prevent the date of departure being set to prior to the current date

Please review Thomas's suggestion in the link below, this will also work for Forms for O365

https://community.nintex.com/t5/Nintex-for-SharePoint/Hi-in-Nintex-Form-how-can-i-stop-user-to-selec...

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: set cascading lookup filter based on the value of a choice field

Hi Tanbir,

This works but only when the user hits save, ideally we need this to be highlighted as invalid on select instead

Thanks
Chet
0 Kudos
Reply