October 1, 201015 yr Looking for the best approach. I have a field 'password' that on record creation gets populated with a random string. The field validation set to unique. So, I would like the password filed to auto populate with a unique number. Can I create a looping calculations (on its own, or via custom function ) that will keep trying until it is unique. OR, do you think it has to been done with a script.
October 1, 201015 yr The only way to do looping calcs is through recursion - a function that calls itself. So you can make a custom function that calls itself. Good luck...
October 1, 201015 yr I would script this. A calculation would require a custom function AND a list of existing values - which means either a value list or a x self-join. A script, OTOH, needs only to check for validation error upon committing the record - and you only need to do this once per record anyway.
October 4, 201015 yr Actually on second thought why bother at all. Just don't require the password to be unique. After all if it is a random string the odds are very low you will have a duplicate and will it even matter if you do?
October 4, 201015 yr After all if it is a random string the odds are very low you will have a duplicate That depends on the length of the string and the number of records.
October 4, 201015 yr Author Thanks guys, I will go with the script. I know the odds are low, but for this project it too risky.
Create an account or sign in to comment