Return a number when an option is chosen

  • rasmje
    Asked on September 18, 2019 at 7:31 AM

    Hi Jodel

    We use your forms as an order system for our members in a sports club.

    Example:

    One member order her shirt.

    She fill in all her information.

    Afterwards get these information in excel and can make the final order at the sport warehouse.

    As we need a unique number on the shirts (Requiered in soccer), i have to put in an extra column manuelly and add a number.

    Is there anyway were i can make the form add a number, depending on which team they order for?

    If you look in to my forms, you can see under the title "vælg hold" (means choose team), that we have a lot of teams.

    My wish is that if the first one ordering chooses for instance "U4 drenge", he will get number 2. The next number 3 and so on. Som numbers needs to be excluded. For instance number 1.

  • John Support Team Lead
    Replied on September 18, 2019 at 9:04 AM

    Hi @rasmje,

    If you're referring to this form: Bestilling fodbold 2020/2021, you can try assigning values to either the "vælg hold" dropdown or Single Choice Field. In that way, the options will return a corresponding number value when the user chooses it.

    Please refer to this guide on How-to-Assign-Calculation-Value. Here's a quick demo on to better illustrate it:

    Return a number when an option is chosen Image 10

    I may not able to understand where would you like to put the number though. Could you please provide further details about it please so we could suggest for a possible workaround?


  • rasmje
    Replied on September 18, 2019 at 9:39 AM
    Thanks for the quick reply, although it wasn't a solution. I know it's a bit complicated.
    The first person who fill out the formular and choose "U4 drenge" should get the first number in a number range i have choosed. For instance number 2. The next one who choose "U4 drenge" should get number 3.
    If another person choose "U5 drenge" he should get number 2.
    It may not be vissible for the persons who fill out the form. It's only vissible for me, when i pull the data out in an Excel.
    Then i can forward the excel as an order for the sports supermarket, without adding a column and manually add numbers for their shirts.
    /Jesper
    Den 18. september 2019 kl. 15.04.51 +02.00, skrev JotForm :
    ...
  • rasmje
    Replied on September 18, 2019 at 9:39 AM
    In this excel you can see what i mean - hopefully.
    /Jesper
    Den 18. september 2019 kl. 15.19.13 +02.00, skrev Jesper Rasmussen :
    ...
  • Kevin Support Team Lead
    Replied on September 18, 2019 at 10:30 AM

    The first person who fill out the formular and choose "U4 drenge" should get the first number in a number range i have choosed. For instance number 2. The next one who choose "U4 drenge" should get number 3.

    If another person choose "U5 drenge" he should get number 2.

    I'm afraid that this is not possible at all, the only way to have unique numbers related to each option is through the calculation values as explained by my colleague above, but this number cannot change as the user selects the same option on multiple submissions, so if the first user selects "U4 drenge" and the calculation value for this is 1, then the form will return 1 each time this option is selected regardless how many submissions are with this same selection. 

    If I misunderstood your requirement, please provide more details about it. 

  • rasmje
    Replied on September 18, 2019 at 10:39 AM
    Hi again
    I may have found a workaround.
    Their is a widget called "counter". I understand the meaning with it.
    Is their anyway i can make it start the count at another place then 1?
    That will solve my problem and make my life a hole lot easier although i have to setup rules for every choise :D
    /Jesper
    Den 18. september 2019 kl. 15.23.10 +02.00, skrev Jesper Rasmussen :
    ...
  • John Support Team Lead
    Replied on September 18, 2019 at 10:59 AM

    Instead of the Submissions counter, you can use the Unique ID widget. It allows you to set which number will the counting starts.

    Return a number when an option is chosen Image 10

    Please try that and let us know how it goes.

  • rasmje
    Replied on September 19, 2019 at 8:39 AM
    Hi
    It works like you says.
    However i need to have a unique counter for every option.
    So if i choose U4 mix, i need the counter for all the other options to hide in the replys.
    Otherwise i have to make a form for every team (option), which also makes me to pull out data from a lot of forms.
    I have tried to hide and make som rules for this, but i can't make it work. Maybe it's because it's a widget?
    Den 18. september 2019 kl. 16.59.26 +02.00, skrev JotForm :
    ...
  • John Support Team Lead
    Replied on September 19, 2019 at 10:52 AM

    Unfortunately, you can only have one Unique ID widget for a form. Its purpose is to create a unique transaction code for each submission.

    So if you want to have multiple transaction codes for each team, I believe creating different forms for each could be the best solution for that.