Lists of text to be displayed individually in dropdown

Hello!

I am currently building an employee profile, and I have 1 data type I labelled “country”. What I want to happen is the dropdown of fields, namely, country, city, province, are dependent from one another.

Currently, each city in a province and country is built in the database, individually, I was just wondering if I can make a field for the city which is a list of texts but display it individually when I run the dropdown for the city. I tried it but it shows all cities in the same cells in the database, as well as displayed in 1 and the same dropdown but only separated by a comma.

2 Likes

Hi!

Try this!

If you are trying to define a list of options in a dropdown menu where a data source is a list, where in some cases it can be just one piece of data and in other cases it can be multiple pieces of data, separated by a comma. You must configure in the dropdown, the choices style to dinamic choices, the type of choices to text, the choices source to “do a search for: your list: data type” (with sorted option if you want) and in the option caption just the current option.

6 Likes

Thanks mate! I it worked, but I have to figure out how to sustain its dependency from another dropdown since the workflow is: country > province > city.

While I am able to run country to province properly, your solution worked but the filtering seems not to work with it.

Let me know what you did.

Your database is defined as:
country (txt) > province (txt) > city (txt - list)

Right?!

Then, in the city dropdown, you need to use the suggestion I gave to create a list of countries, separated one by one.
The province dropdown list needs to be grouped, to show a list of provinces (unique names).
And you need to use some constraint to filter province by the country, and city by the province.

Could you share some screenshot of this filtering?

This is the first dropdown: country

then the country will filter the province within the country:

I am supposed to use the same logic, but the cities are listed in one cell in the database like this:

Because they are made this way, I made the data source like this and and got this:

The city became an independent dropdown on its own but the cities inside a cell, is displayed individually instead being in one row separated by commas

1 Like

Thank you very much. It work like a magic.

1 Like

Hi! Does this work for a list of users?

I have a list of user’s usernames (who are clients of the person accessing the dropdown) formatted as users, that I want to display in a dropdown in order to filter between clients. When I set up the logic as either “Current User’s Clients” or “Search for Users: each Item’s Clients”, it just displays blank entris.

How can I fix this?

Before give you some answer, let me ask few things to have a better context here.

Is the user’s usernames list a text type field or custom type user field?
If it is a text-type why not use a custom type user?

If it is already a custom type user, so Current User’s Clients is in fact a list of users, you just need to use it as the source of the dropdown (in case this is not a large list). So when you set the source of the dropdown to be an object like user (or a field that reference users) you need to also set some specific field to be displayed as the caption in the dropdown. This caption will be the value displayed as the dropdown’s options.

Hello! Thank you for the response and thank you for pointing that out… I thought I had it as a custom type User, but I had it set as a text. I have not changed it to a custom type yet, but I will and I think I have it set up correctly if it was a custom user type.

As a result of this change, the input I have for the user won’t accept it as a custom type, it only lets it be a text type. Is there a way to convert it from text to custom type user?

Hello,

I have this set up as a custom list of users.

I currently have it set up as the choices are the current user’s clients, displaying the client’s first name.

The dropdown displays the following when I log in as the trainer and try to access the client list.

Are you sure that there are Users in that list?

Did you check Privacy Rules?