I have 2 cascading combo boxes (Region and Country). Selecting a Region will filter the Country combo box with the countries in that region. What I want to achieve is that every time a user changes the Region, the Country combo box is cleared and forces the user to select the country again.
OnChange for the Region has the below code to trigger a reset for Country:
UpdateContext({ResetDropdown: true});
UpdateContext({ResetDropdown: false})
Rest of the Country has the below code:
ResetDropdown
The Country also has a formula for DefaultSelectedItem as below:
If(variableStatus <>"New",LookUp(Country,ID=variableSelectedItem.Country.Id))
If variableStatus = "New" then this works without an issues.
The problem comes in the case the variableStatus is <> "New". I cannot find a way to to reset the Country as the below would understandably not work:
If(variableStatus <>"New" && ResetDropDown , LookUp(Country,ID=variableSelectedItem.Country.Id))
I had tried to have the ResetDropDown set to true onChange of the Region and then make it false again OnChange of Country but could not get anywhere.
Would appreciate any guidance.
Cheers