Multiple Checklist for Zip Code, City, Country

Hello team,

I have a table containing:

  • Zip Code
  • City
  • Country

Respectively, there is a table Zip_VILLE containing:
ID | Zip_Code | City | Country

I use checklists to display these choices.
The user must select in each checklist:

  • The city
  • The Zip code
  • The country

When a user chooses a postal code, I would like the other checklists corresponding to the city and country to be set by default so that the information in the checklists is always the right ones

Currently, a user can choose a City and put a Zip Code of another city for another Country.

Screen capture : Dropbox Capture

How to do it simply with Glide?

Thanks for your help

Can you show me what this table looks like?

Thanks Darren

Actually, like that Dropbox Capture

Okay, thanks. That’s what I expected, just wanted to be sure.

Question: Is the City to Postcode relation strictly 1:1, or could a City have more than 1 Postcode?
If it is 1:1, then why do you need the user to select both?

Always 1:1
Some users prefer to find a city by selecting the Postal Code. Others prefer to search for the City. And others eliminate the choices by choosing the Country.

I could have 500 rows in this table

That’s a tricky one. The only way I can think of to get the exact behaviour that you are looking for would be to have multiple sets of components and toggle visibility conditions. But that could be overly complex.

My suggestion would be as follows:

  • Force the selection of the Country first, and then allow the user to select either the City or the Postcode

To get that behaviour, you would need the following:

  • City selector:
    – Visible when Postcode is empty
    – Filtered where Country is Screen->Country
  • Postcode selector:
    – Visible when City is empy
    – Filtered where Country is Screen->Country

The effect of the above is that the user would initially only see the Country selector. Once they select a Country, then both the City and Postcode selectors would appear, and both would be filtered according to the selected Country. Then as soon as they select from either, the other one would disappear.

2 Likes

Would there be any cases where the same ZIP code can exist in 2 different countries?

Oh thanks a lot, it works perfectly
:smiling_face_with_three_hearts: :heart_eyes: :heart_eyes: :heart_eyes: :heart_eyes: :star_struck:

1 Like

No, only 1 zip code for 1 country.
Have you an idea ?

No, I was just asking it as an edge case. I was thinking about joining the Country - City - ZIP together in one template, and display them on the front end.

On the back end, you record the ID of that record, so users only have to choose one time.

However, I think that may not be what users typically expect when they enter these types of info.

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