Newbies Zeb Posted March 29, 2005 Newbies Posted March 29, 2005 newbie question. I have a field which can contain a number. Not every record requires a number to be entered but when it does I need a script that will go through all previous records to find the highest number used, then I can increment it by 1.
dwins Posted March 29, 2005 Posted March 29, 2005 Create a summary field that finds the maximum in all records displayed - call it Max. If, on creating new record, you want your number field to update itself, add an auto enter calculation: Max+1.
Ender Posted March 29, 2005 Posted March 29, 2005 It would be faster to use a self-join relationship, with a cartesian join (use the X instead of = comparison operator), and then use Last(selfjoin::field) as the calc in the Set Field[] script step. If the numbers could be out of sequence, then you'll need to sort the self-join relationship by this field.
Ugo DI LUCA Posted March 29, 2005 Posted March 29, 2005 This seems a good occasion for LookupNext ( ) function
Newbies Zeb Posted March 30, 2005 Author Newbies Posted March 30, 2005 Thank you all so much!! I've used "dwins" Summary field solution and it works great...... now, I must go and buy a book and learn more about FM Cheers!!
Recommended Posts
This topic is 7181 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 accountSign in
Already have an account? Sign in here.
Sign In Now