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.

Find highest number

Featured Replies

  • Newbies

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

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.

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.

This seems a good occasion for LookupNext ( ) function

  • Author
  • Newbies

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

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.