Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6461 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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.

This topic is 6461 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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