- hviAsked on December 29, 2014 at 05:08 PM
Is there a way to change the prefix based on a required field answer? For example, our Product Category field has nine possible answers and we would like to use a 2-digit prefix based on which Product Category is selected.
Or would it be easier to assign the 2-digit code to a new field based on the Category selection and append the Unique ID, thus creating a third field?
This is a re-post of a comment on How to Add Custom Unique IDs to your Form Submissions?
- ShadaeAnswered on December 29, 2014 at 06:50 PM
Unfortunately, it would not be possible to do either option as the Unique ID is not generated until the form has been submitted.
There however is a work-around that you can try with conditions and calculations.
This would allow the prefix of your ID to be determined by an option selected in a drop-down menu. The number behind the prefix would then be randomly calculated.
You can view a sample form here: http://form.jotformpro.com/form/43626659433967
Would this be a suitable option for you?
- hviAnswered on January 20, 2015 at 09:52 AM?Hi. Thanks for the suggestion. I've been playing around with this. We can't use a random number because our IDs need to be Unique when we import them into our database. I assigned the 2 digit code for the prefix as you suggest in the form below and assign it to a 2nd hidden field. Then I have the Unique ID field create a 5 digit unique ID. Then when I import the form data into our database, I conjoin the two numbers. So I don't actually have the 7 digit ID we need on the form itself, but it works out.
Thanks again for your help.
Technical Programs Manager
Home Ventilating Institute
?855.HVI.VENT (855.484.8368) Ext. 103
- ShadaeAnswered on January 20, 2015 at 10:59 AM
You are most welcome, I am happy to hear that you have found a suitable alternative.
Please feel free to contact us if you need further assistance.
Thank you for using JotForm!