Is there a way to make Unique ID using condition in one form?

  • Profile Image
    ayralee
    Asked on May 04, 2021 at 12:41 PM

    is there a way to make unique id using condition in one form? for example there's two option type, A and B. if user choose A, the unique id will use A-001. and if user choose B, the unique id will use B-001



    This is a re-post of a comment on How to Add Custom Unique IDs to your Form Submissions?

  • Profile Image
    VincentJay
    Answered on May 04, 2021 at 04:09 PM

    Hello,

    You can pass the Unique ID data to your form field by following this guide: https://www.jotform.com/help/286-how-to-pass-field-value-to-another-field

    Unfortunately, the unique ID won't change unless the form is submitted so there's no way it will show B-001 based on the user's answer.

    Let us know if you need further assistance. Thank you!

  • Profile Image
    ayralee
    Answered on May 04, 2021 at 10:39 PM

    can you give me an example how to pass the unique id data to the form? because I still don't understand

  • Profile Image
    Ariel_P
    Answered on May 05, 2021 at 05:43 AM

    The Unique ID widget only generates a value after submission, so you can't use it in Conditional Logic.

    You should use the Random Value Generator widget instead.

    The condition would look like so:

    1620207718_6092686637136_

    You may refer to the following guide for more related information: How to Pass Field Value to Another Field?

    Here’s a demo form with the setup above applied: https://form.jotform.com/211242069390046. Feel free to clone the form and use it as you please.

    If you need further assistance, please feel free to contact us.

  • Profile Image
    Ariel_P
    Answered on May 05, 2021 at 05:55 AM

    Looks like I misunderstood your question.

    I've updated the demo form to match your requirements.

    The condition now looks like this:

    1620208453_60926b45c2163_

    Do the same for Type B.

    If you need further assistance, let us know.

    Related guide: How to Insert Text or Calculation Into a Field Using Conditional Logic

  • Profile Image
    Niko_N
    Answered on May 05, 2021 at 09:54 AM

    Greetings,

    You can change Allowed Characters to numbers from the widget's settings:

    1620222557_6092a25da7242_

    However, it's not possible to get the sequential numbers using the Random Value widget.  That's only possible with the Unique ID widget, yet, as mentioned previously, the value of the Unique ID widget is generated by the back-end server once the form is submitted, so it's not possible to include its value within conditions.

    Thank you!

  • Profile Image
    newjobs
    Answered on May 10, 2021 at 02:20 AM

    Is it possible to show UNIQUE ID WIDGET generated number as current status is hidden.

  • Profile Image
    Ariel_P
    Answered on May 10, 2021 at 04:41 AM

    I am not sure if I have understood your question correctly, but if you're still referring to the Unique ID widget, then no. The widget only generates a value after submission. So you can't use the widget's value on the form.