What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Can Unique ID only update if radio option is chosen?

    Asked by mcwatson on January 05, 2015 at 07:15 AM

    Hi,

    Is there a way of the Unique ID field only being used in a form if one of two options in a radio field is chosen?

    So, I have a form and the first question is a radio button question of What do you want to do? The two options are Log a new helpdesk call and the second is Update an existing helpdesk call.

    If you choose one option, your presented with a number of fields to complete, if you choose the second option, you have different fields to complete.

    But I want a Unique ID field to be part of the Log a new helpdesk call fields and to increment by 1 if someone is logging a new call. But if they choose Update an existing helpdesk call, then the Unique ID should be ignored and no incrementing should take place so that the number isn't used.

    Don't know if this makes sense......

    You may think, why not have two forms, one for logging a new call, one for updating an existing call. The reason is that two forms means two spreadsheets and I then have to combine the data which isn't very easy in Google Sheets as vlookups can't happen across sheets so I'm trying to find a way of having the data within one sheet, whether I'm logging a new call or providing updates to an existing call.

    Kind regards,

    unique id unique radio option different
  • Profile Image

    Answered by Ben on January 05, 2015 at 11:04 AM

    Hi,

    At first I was thinking of suggesting using 2 different jotforms or using 3 and have the other 2 within iframe embed widget.

    Now based on everything that you have mentioned, I would like to ask if maybe this app would help you to achieve what you need:

    Combine Submissions

    Do let us know how it goes or if that is not what you wanted to achieve and we will be happy to find an alternative.

    I would also like to answer your question above. The Unique ID is not possible to alter through the code. It is activated once the server receives the message of a new submission, so it would not be possible to not use it once it is added to the jotform.

    Best Regards,
    Ben

  • Profile Image

    Answered by mcwatson on January 05, 2015 at 11:10 AM

    Hi Ben,


    Thanks for your reply.

    I have considered the Combine Submissions tool previously but if I've understood it correctly, it's only useful to collate existing submissions where as I need to have it set up so that as a new helpdesk call comes in or an update to an existing call comes in, it combines the info into one spreadsheet and presents the latest. The combine submissions tool would need me to run it everytime a submission is received.

    Ultimately, I'm trying to create a dashboard spreadsheet so that it has the original helpdesk call information, then takes any updates to those calls through the updating call form and the spreadsheet presents the latest.

    The only way I've managed to do this previously is to have two forms populating two spreadsheets and then use Data Everywhere to pull the info in into one sheet and then report against that.

    Kind regards,

    Mark.

  • Profile Image

    Answered by Ben on January 05, 2015 at 12:39 PM

    Hi Mark,

    OK, I see. While it would not be possible to eliminate the Unique ID widget as mentioned earlier, I would presume that you could add a new way of creating a ticket?

    I have created a simple sample that should create a unique number for each submission, although not sure if that would work for you. Basically if you create it yourself, you can then ask for the user to add it or even remove it from the jotform - as you want.

    Please take a look at this following jotform:

    http://form.jotformpro.com/form/50044336410946

    If you would like to have a closer inspection of it, you can clone it to your account instead and if that would work for you I would be more than happy to explain all the steps I made there.

    Best Regards,
    Ben

  • Profile Image

    Answered by mcwatson on January 06, 2015 at 04:02 AM

    Hi Ben,

    Thanks for this option, I didn't think or know how to do this with the conditions and I think I could make this work for my scenario.

    I understand the steps you've taken to do this as I've cloned the form and seen the conditions. Only thing I would ask you to detail is how the ticket ID is made up as from the condition below, I couldn't work out how the ID is derived. Ideally, I want to make the ID a little simpler so it can be referenced easier but without risk of it being duplicated if two calls are logged close together.

    Many thanks,

    Mark.

    IF Unique ID Is Empty 
    AND IF
     What do you want to do? Is Equal To "Log a new helpdesk call"
    Insert TicketID{Current Date and time}_avgNoZero({Current Date and time},{Current Date and time}~2) into Unique ID
  • Profile Image

    Answered by mcwatson on January 06, 2015 at 06:13 AM

    Hi Ben,

    Just thinking about this a bit more, one flaw I do think this solution has is that it makes the reference number more complicated and so when an individual wants to quote the number in order to update a helpdesk call, its far more prone to putting in the wrong ID.

    For example, my current form has a prefix of GHC and four zero's, then the Unique ID goes 1, 2, 3 etc. So the user just has to add the number of the ticket in to what is a pre defined format.

    Doing it the way you've suggested means they'd have to remember the order of quite a few characters albeit I acknowledge the ID could be simplified.

    This is assuming that there is no method of retrieving or looking up the ID's that have been made on previous submissions?

    Mark.

  • Profile Image

    Answered by Ben on January 06, 2015 at 08:40 AM

    Hi Mark,

    OK, I do agree that the number is a bit complex, but in the same time your users can not provide you with the ID of someone else ie just change the number up or down.

    How it is done:

    IF Unique ID Is Empty
    AND IF What do you want to do? Is Equal To "Log a new helpdesk call"
    Insert TicketID{Current Date and time}_avgNoZero({Current Date and time},{Current Date and time}~2) into Unique ID

    First we check if the field is empty or not since we do not want to create a new ID if we already have it set.

    We also check if the users would need the new ticket number or not and then we go to the calculation that we insert into the Unique ID field.

    Calculation is made using the current time number identifier and to make it less prone to having the same number being given to someone else, we calculate the average from the same number and its root.

    This way we have one almost unique number followed by another almost unique number. I had the rand function in there as well, but I guess that I have removed it to make it shorter so basically we do not need that last segment after _.

    Do note that unfortunately only Unique ID widget can provide you with the ID that you are looking for, but as it can provide you with that, it can also not provide you with the option of removing it or changing it.

    At this time based on all your responses, it might be best to match the entries in the spreadsheet with the option to create a new ticket or not and then ignore or remove the IDs where the old one should be used.

    Also, did you consider allowing your users to update the form at a later date with new info, or to provide them with a pre-filled form through the email, this new form holding the ID that they already got assigned?

    To see the sample of the last please check out this jotform: http://form.jotformpro.com/form/50053637068959

    You will see the same link in Thank you message and in the email that you get.

    Best Regards,
    Ben