How to maintain uniqueness for user created data


I have the following use case with three entities as shown below

Country -> Cities -> Localities

Country is a selection from the list (maintained in excel)
Cities are user-generated meaning the users would add cities
Localities are user-generated meaning the users would add localities.

How do I maintain unique entries for cities/ localities?

Appreciate help!

As long as cities and localities are user generated, it will be difficult to keep them unique. But what you can do as a workaround is to add a parameter tab in your sheet, if not already done, where using a unique formula you will collect all cities typed by your users, they should be unique if they type them correctly, respecting some uppercase / lowercase rules.

Then if the UI where your users have to type the city, you add a choice component pointing on the unique values column of the parameter tab. Ask your users to search for the city in the list, and if it does not exist, allow them to add a new one (you can add a checkbox component "add a new city which, when checked, will make appearing a text entry component).

But be sure that you will have duplicate and you will have to maintain your list manually regularly.

Unless someone else has an idea or solution?