March 18, 200718 yr 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
March 18, 200718 yr 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.
Create an account or sign in to comment