Assign numerical values to answers

VMM
New Member

Hi everyone. I would appreciate help in reference to the following:
In 5 columns of type “Enum” with two options given (YES and NO), I need that when the user answers “YES” a numerical value is assigned to that answer (lets say "1") and when the user answers "NO" another value is assigned to that answer (lets say “0”). The numeric value may or may not be seen by the user. On the other hand, after completing the questions, sum up those number values ​​and show the total in another column.
What expression could help me?.
I would greatly appreciate your help.

Solved Solved
0 4 388
1 ACCEPTED SOLUTION

Thanks Mark.
Can you elaborate: “Then you can get the value with [enum-column].[value].”?

View solution in original post

4 REPLIES 4

You can set up a ref table for your options, with 2 columns; [option name] and [value]. Then in your Enum column, change the base type to “Ref”, and point it to your new Table. Then you can get the value with [enum-column].[value].

Thanks Mark.
Can you elaborate: “Then you can get the value with [enum-column].[value].”?

Thanks for your help Mark.
I created the ref table and managed to make it work but by making the main column directly of type REF and referencing the created table. I can’t get it to be of the Enum type and with the Ref as a Base type. Anyway activate the option show as buttons in the Ref and it works very well. Thanks again

Top Labels in this Space