Expand my Community achievements bar.

Random number, is it possible?

Avatar

Former Community Member
Hi there,



I need some quick help.



I have a form in LiveCycle already, but I want to add a field on the form that is essentially an order number. This should be random, and I don't want/Can't connect to a database.



What I am essentially looking for is a text label that says:



Registration #: 88888-77777-66666-55555



And somewhere/somehow I essentially want that to look like:



Registration #: <1st 5 digit Random> - <2nd Random> - <3rd> - and so on.



So How do I do that? Any help would be greatly appreciated.



-Adam
1 Reply

Avatar

Level 7
JavaScript has the Math.random() funciton that is available to LCD. This funciton returns a number between 1 and 0.