Province selection based on country

I am using a form to get some input. Among other things it uses a table like below to get the country and province from the user :-

|Canada|Toronto|
|Canada|Vancouver|
|Australia|Melourne|
|Australia|Tasmania|

For Country and province I am using the choice list component. How can I design a filter to uniquely select provinces based on the country already selected on the form. So basically I want to display the provinces relevant to the country in the province list so that one may be selected.
Thanks.

4 Likes

There are quite a few approaches. Have a look at this thread, I think it’s what you are looking for.

Note: Above method only works with details screen. You could create your own form in a new details screen.

You should have a Sheet of choices with Country and Province as columns.

Then only show the country choice at first, show the Province choice when the Country choice is not empty.

Filter the choice values of Province by Country is Screen’s country value.

1 Like

I know that’s just an example, but…
Melbourne (not Melourne) is a City, not a province/state :slightly_smiling_face:

Hi Darren,

Sorry, I think it’s just a typo. And right it’s a city. Thank you.

Super good ! It worked !! I was making a small mistake but i was unable to detect it even after hours of work. Your mail helped me solve it. Also this uses the choices element for country and province which I think is better than inline for such selections.

Thanks loads !

1 Like

Thanks loads or this wonderful link. It’s a big one and quite informative. I’ll try your approach after I go through this in detail.
Thanks loads !

1 Like