DMXzone App Connect Support Product Page
This topic is locked
This topic was archived by Teodor Kuduschiev on 9/24/2024 7:24:19 AM
Generate random number and insert into database
Asked 16 Mar 2017 17:32:52
1
has this question
16 Mar 2017 17:32:52 Brad Lawryk posted:
I need to generate a 10 digit random number, check that the number doesn't already exist, and put that number into a hidden field and then enter that into a new record with the rest of the form.Possible with these extensions or do I have to do something custom?
Replies
Replied 16 Mar 2017 17:34:21
16 Mar 2017 17:34:21 Brad Lawryk replied:
Here is the code I used to use ... is there a way to use it with App Data Actions?
Replied 17 Mar 2017 15:50:40
17 Mar 2017 15:50:40 Teodor Kuduschiev replied:
Hi Brad,
Why don't you add an GUID/UUID column in your database instead - it will generate an unique ID on creating a record.
Why don't you add an GUID/UUID column in your database instead - it will generate an unique ID on creating a record.
Replied 17 Mar 2017 16:03:46
17 Mar 2017 16:03:46 Brad Lawryk replied:
There is one.
But this is a government project and it requires a random unique 10 digit ID for security purposes. The database itself is about 6 years old already has has about 15,000 records. To change the structure now would be impossible.
But this is a government project and it requires a random unique 10 digit ID for security purposes. The database itself is about 6 years old already has has about 15,000 records. To change the structure now would be impossible.