Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Can I assign a integer value to a string?

Topic Labels: Formulas
781 1
cancel
Showing results for 
Search instead for 
Did you mean: 

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)