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 392
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