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

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

Recommended Posts

  • Newbies
Posted

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.

confused.gif

Posted

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.

Posted

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.

  • Newbies
Posted

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!! BigThumbUp.gif

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