Dropdown list limited to the user ID

Hi,

I have an Enum list dropdown that links to a Company Name column in a Company table. I also have a Users table where it lists all the users and which company they belong to. These tables are referenced by Company ID.

I would like the Enum list of company names to only show company/companies to which the user belongs to. I’m thinking that the reference does not need to be used here. Maybe just the Users table which only allows choices by userid(). Is there an expression that would accomplish this in the Valid If section? Or other way to get this to work?

Hi @Peter_S1

You may want to use a SELECT formula into the “suggested value” area of your column.
Many possibilities exist.

This article may help you:

These posts are solved and may help you as well

Let us know if you are still having trouble developing the SELECT or FILTER formula.

2 Likes

Thank you. Whenever I tried the SELECT function, something like:
SELECT(Users[Company Name], [Email] = UserID). It would remove the Company field all together when I went to the App and clicked to add a new record, the Company field would just disappear.

When I used the Enum list filter solution (ORBERBY expression), it worked the closest but for some reason returned the values in the Key column of the Users table vs Company Name. I was not able to make out why it was dong that when that column was not referenced.

USERID() is not an Appsheet expression.

Are you wanting USEREMAIL() ?


That typically means that the valid_if expression you gave does not produce any results.

FILTER() always returns key values.

1 Like

Thank you, Marc. Yes, I meant useremail(), typed it incorrectly here. Got it working it actually, had a typo in my expression.

2 Likes