Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Field Calc, Retry if (error) not unique

Featured Replies

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.

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...

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.

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?

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.

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.