Show Icon from value in Enum List

My app has a list of contacts in which you can select a “role” for the customer in the customer form. Contacts can have more that one role so the options are in an enum list. In the deck view I am trying to assign and icon to various roles… ie. “Billing” “Sales and Service” “Manifest” I’ve encountered the problem before and have solved it by changing the column type to enum (yes/ not result) instead of enum list but in this case having multiple selections in the list is necessary.

Is there a way to assign an icon per role with the column type set as enum list?

[Role] Values are “Billing”, “Sales and Service”, “Manifest”

Solved Solved
0 8 1,268
1 ACCEPTED SOLUTION

Try IN("Billing", [Role]).

View solution in original post

8 REPLIES 8

Steve
Platinum 4
Platinum 4

Thanks Steve. I had read this before and had not found the answer there. When I try to use the expression [Role] = “Billing” I get an error: Cannot compare List with Text in ([Role] = “Billing”)

The values are coming from an enum list in the [Role] column.

Try IN("Billing", [Role]).

That did it! Thanks. Would love to know the interpretation of the formula so I can learn.

The solution from @Steve was to check if the text “billing” is found IN the list in the column [role].

For example:

  • IN("Banana", [FruitEnumList]) : returns TRUE if the column FruitEnumList contains the value, “Banana”.

You can read more about IN and other expressions on the Appsheet support site.

What @Mike said.

hi @Steve. a slightly different need.
i want to show a Text Field only when the value “Hourly Rates” is the selected one from the list in the Ref.
if i put IN(“Hourly Rates”,HEADERS[Billing]) in “Show_If expression for column Requestor (Yes/No)” it only gives Yes / No Buttons
does this make sense?

Ooops, wait! the Field i wanted had changed to type Yes/No. set it to text it looks like it is working.

thank you!

Top Labels in this Space