Is there a way to have options of Enum from a list on another table?

The Enum option is Very useful for limiting the options for users. (Particularly if shown using buttons…)

However,. So far I found either it has to linked to a reference table or a list of “hard coded options”

Is there a way where an Enumlist value in another table can be used to populate the options of Enum in the current table.

Explanation.

The idea is to maintain an Enumlist in a separate table than having to hardcore the Enum list options when changes are required.

Example:

Keeping the hours for jobs. In our case engineers bill different rates for different tasks. The task in options may change in per job. (And there are several jobs every year). So if an Enumlist can be setup in a table to keep the task options for each project. So when the job is selected only the task options for that job are displayed - typically 3 to 4 options. (Instead of a list of 30+ options every time time is imputed)

Is this possible?

0 4 244
4 REPLIES 4

Yes, absolutely.

Create your list table. Then in the table where you want to show the dropdown, insert a SELECT expression into that columns Valid_If to provide the list of valid choices.

For example, let’s say I have a list of Categories so I create a Categories table and insert rows of all the possible Category choices.

Then I have an Items table which has a Category column. I want my list of Categories to show in a dropdown. I would insert in the Valid_If property of this Category column an expression like this:

SELECT(Categories[Category], true)

This will return all Category names BUT I can shorten it like this:

Categories[Category]

To take this one step further…many times you want to filter your selection list. Let’s say in our Categories table we have a Type column. And one of the types might “Cars”. If I wanted t filter the Categories table and only provide the “Cars” type of categories, I would write the expression like this:

SELECT(Categories[Category], [Type] = "Cars")

I hope this helps!

John,

Thank you for your prompt reply to my question.

It clarifies things a quite a bit.

Will try and get back to you.

John,

Your suggestion worked like a charm !!..

But…

However, I realize I could use the already existing values of the column as choices for Enum.
This simplifies some housekeeping. (I think).
The problem is that when I use the already existing values of the column to populate the Enum options, Now the option to add new values is not visible. (I can not add new values to the column, in other words, the ENUM option does not show the “ADD” option anymore).

Is there a way around this limitation

Is there a way around this?

Detail Description:

Table = List. Account
(NOTE: I already realized that using a dot “.” in a column name give problems and I am working on using “_” underscores from now on).

Column: Acct.Institution (Data type = Enum)

Data Validity = List.Accounts[Acc.Institution]

(See Image below)

@matt

Use Suggested values rather than Valid If.

See also:

Top Labels in this Space