How to assign numeric values to dropdown items and populate another field using it

  • magicbound
    Asked on April 25, 2019 at 9:36 AM

    I have a dropdown list for names of people, but I need those names to be converted to a number (user ID). Is there an easy way of doing that to populate a field with a number instead of a name without creating a huge number of conditions.

    I'm hoping that a name could be associated with a number. For instance, "Bill" is see in the form, but when selected it places a "24" in the field.

  • birant
    Replied on April 25, 2019 at 11:56 AM

    Hello,

    You may use calculation values:

    https://www.jotform.com/help/301-How-to-Assign-Calculation-Value

    Just turn it on from properties and associate your users name with their IDs. You can refer the user IDs in conditions as values.1556207391Screen Shot 2019 04 25 at 18 Screenshot 10

     

    Here is an example condition that refers userID's as values.

    1556207552Screen Shot 2019 04 25 at 18 Screenshot 21

    For more information about Update/Calculate field conditional logic:

    https://www.jotform.com/help/268-How-to-Insert-Text-or-Calculation-into-a-Field-Using-Conditional-Logic

    You can fiddle with this form if you want.
    https://form.jotform.com/91144261841957