Conditional choice field

Hello everyone,
I am trying to build a form with 2 choice selections :

  • one for countries
  • one for cities
    Once a country is selected I would like in the second choice field to display only cities related to the country selected. Is it possible to that?

What I am trying to do :

Couldn’t find the topic so posting up.
Thank you a lot ! :slightly_smiling_face:

Assuming your Cities table has a Country column, you can create a filter based on Screen Value. Imagine my Choice component is for the Cities choice, and the Category is the Country name that would be in your Cities table. It should be a very similar setup for you. When filtering by Screen Values, the filter looks at the values in the other components on your screen.

So, what you do is filter the Cities where the Country column in that cities table is equal to the the Screen Value of the selected Country choice.

image

1 Like

Yes, it is possible and easy… add a country column for cities, and use the if-else column to extract cities with the country selected in the first choice.

@Jeff_Hager thank you Jeff it works well!

However it keeps modifying my table (both countries & cities columns) when I use the choice components on the layout :

Do you know why ?

My table is supposed to be :
France - Paris
France - Marseille
England - London
England - Manchester

My choice component setting is :

You’re most likely writing your choice back to the same column that you are using as the source of your choices, so it’s just overwriting them. You should be writing to a separate column, or your choices should be in a separate table.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.