General information
Category:
Coding, syntax & commands
>>>>Does anyone have a snippet of code that will generate a random, yet unique id of the form
>>>>
>>>>A######, where A=any alpha and #=digit
>>>
>>>I think SYS(2) will return a unique id.
>>
>>No, Sys(2) returns the seconds elapsed since midnight...
>>Your best bet for uniqueness is to implement a counter for both the letter and the number part. If you use randomness there is no guarantee of uniqueness.
>
>In my case, it did the job. I only used it, sometimes, to give the form a random name. The user will not fire the same fire twice in the same second so this was good so far. I used 'A'+SYS(2) to create the form name.
You can check about Rand() fonction may be you can build what you need with this....
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only