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,262
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