Forum Discussion

William's avatar
William
Qrew Trainee
3 years ago

Convert yes/no multiple choice to numerical value?

Is there a way to convert text into numerical values?  What I am trying to do is have several fields where the choices can either be yes, no or NA.  I want each of these to assign a numerical value. ...
  • MarkShnier__You's avatar
    3 years ago
    No problem, you can make a formula numeric field set to display as a percentage and do the calculations all in one field.  

    var number FieldOneScore = Case([Field One],
    "yes",30,
    "n",0,
    "na",30);

    var number FieldTwoScore = Case([Field Two],
    "yes",30,
    "n",0,
    "na",30);

    var number FieldThreeScore = Case([Field Three],
    "yes",40,
    "n",0,
    "na",40)

    ($FieldOneScore + $FieldTwoScore + $FieldThreeScore) / 100

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------