hican someone help me to generate unique serial# on web in (1…10) series.
thanx
hican someone help me to generate unique serial# on web in (1…10) series.
thanx
Subject: unique serial # on web
Uh… abc? Nice ANONYMOUS name from a person seeking assistance from REAL people. I almost don’t want to help you on principle. Also, posting the same question twice within four minutes isn’t going to score you any points either with the vast majority of this forum’s users. If you need to clarify your question, post a response to the original question.
Anyway, in answer to your question, you can use the LotusScript Rnd() function to generate a random number between 0 and 1 such as 0.1234567 – I’m not sure if it is always seven digits to the right of the decimal point. Here’s how I would create a unique five digit serial number in LotusScript…
Randomize ’ Seed random number generator for Rnd() step below.
doc.serialNumber = Format$(Left$(Strright(Rnd(), “.”), 5), “00000”)
…I grab the first five digits to the right of the decimal point and because I am not 100% certain if there is always going to be at least five digits to grab, I use Format$() to guarantee a five digit number (it will pad with zeros if it has to).
Ken