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.
My issues started when I attempted to
a) Prevent the selection of identical countries when Flight Type = International
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.
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
This is a complex form with many sections which I really need assistance with.
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.
Hope that helps.
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
Unless we can now achieve this using the responsive layout
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