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

script problem for unique value on new record

Featured Replies

  • Newbies

hi, having trouble with a unique value, where the script assigns a new member id # on new record. we have only 2 users; when they click on the Add New button, they are getting the error message that the Memeber ID is already being used.

the last id used is stored in a field called LastIDused, and is incremented by 3 after each new record.

if [memberS::new_member_number]

Exit Script[]

Else

Insert Calculated Result [select: MEMBERS::new_member_number; "C" & MEMBERS::LastIDUsed]

Insert Calculated Result [select: MEMBERS::LastIDUsed; MEMBERS::LastIDUsed + 3]

End If

any ideas or a better way to do this?

thanks in advance,

rog

Is there a reason why you are calculating an ID number rather than serializing it?

Couldn't you just as easily set the ID to be a serial number, incremented by 3 and have the first number C1 (or whatever number you want to start at)? Now, when you create a new record you get the desired result and you let FM do the calculating. Perhaps, I'm missing something, but, it appears to be a simpler and more direct method.

  • Author
  • Newbies

i'll give that a try, thanks!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.