How to make emulist options into numbers?

Hi,

I would like to create an app to calculate the risk.

For example, let me take just two questions.

column 1 - residence_type - urban and rural.
column 2 - literacy_level - literate and illiterate.

While entering data (collecting data) I would like to show the options on the app as two buttons. I used โ€˜emunlistโ€™ feature to create that.

Now, I would like to get a score at the end.

Letโ€™s say
residence_type: urban = 0, and rural = 1.
literacy_level: literate =0, and illiterate =1.

I would like to add the assigned numerical values of residence_type and literacy_level and show the score and add it as a column.

I am new to coding and AppSheet. I will be glad if I get help.

Thanks to all the beautiful people who are helping each other.

Solved Solved
0 6 168
  • UX
1 ACCEPTED SOLUTION

Thanks a ton, Steve.

View solution in original post

6 REPLIES 6

Steve
Platinum 4
Platinum 4

Like this?

(
  0
  + IFS(IN("urban", [enumlist]), 0)
  + IFS(IN("rural", [enumlist]), 1)
  + IFS(IN("literate", [enumlist]), 0)
  + IFS(IN("illiterate", [enumlist]), 1)
)

The logic looks perfect. Thank you. But where do I add this?

Where do you need it?

I would like the calculated score as a new variable in the same table.

For each row? Add a new column and put the expression in as the columnโ€™s App formula.

Thanks a ton, Steve.

Top Labels in this Space