Emunlist with numerical values asigned

Hi Appsheet Community

I am using Appsheet to cover issues with COVID-19. In my form I have a questions with enumlist answers e.g.:

Did you visit same public places?
Bank | Restaurants | Hospital | Supermarkt | No

I would like to assign a numeric value to each option according to the risk and add the values in a Virtual Column. It with other VC will compute the actual status the caller e.g.:

Low Risk | Medium Risk | High Risk

I hope you can help me with these issue,

Luis

The App formula expression for your virtual column might look something like this:

SUM(
  LIST(
    IFS(IN("Bank", [enumlist-column]), 1),
    IFS(IN("Restaurants", [enumlist-column]), 1),
    IFS(IN("Hospital", [enumlist-column]), 1),
    IFS(IN("Supermarket", [enumlist-column]), 1),
    ...
    IFS(IN("No", [enumlist-column]), 0)
  )
)

Replace enumlist-column with the name of the EnumList column. The number at the end of each line is the value you want used for that like’s choice.

1 Like

Hi Steve,

I really appreciate your support. It works perfekt

Thank you :+1:

1 Like