Re: Can I assign a integer value to a string?

554 0
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

I’m doing a survey asking users to rate features on a scale of 1 - 5 using the single select data type. However, the responses are strings like Very happy, Happy, Neutral, Unhappy, and Very Unhappy. I need those values to correspond to numerical values like “Very happy = 5”.

1 Reply 1

Add a new {Rate Value} formula field using the following formula (assuming your rate field is {Rate}😞

SWITCH({Rate}, "Very Happy", 5, "Happy", 4, "Neutral", 3,
"Unhappy", 2, "Very Unhappy", 1)