Skip to main content

Can I assign a integer value to a string?

  • March 18, 2019
  • 1 reply
  • 12 views

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

Justin_Barrett
Forum|alt.badge.img+21

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)