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

help with calculating record number

Featured Replies

Looking for a little help

I've got a calculation field set up to calculate the record number of a record using the calculation: Get(RecordNumber)

It's set up as 'Auto-enter Calculation replaces existing value, Evaluate always'

It works fine when the record is first created, but the problem is that if I delete a record behind it, it retains this number in the field.

I need to figure out a way to make it go recalculate the field, preferably whenever I access the record - so that's it's always calculated "on the fly".

I've played with the script command "replace field contents" and it works when I set it up to recalculate the field - in fact it works across the entire table, which is great, but it seems like somewhat of a cumbersome way to do it.

Anyone have any ideas?

thanks in advance!

Hi iwasnevy

you can use a calculated field with UNSTORED calculation and calc:

Get( RecordNumber )

BTW: this isn't a good way to give a number to a record because it depends from the found set.

I need to figure out a way to make it go recalculate the field, preferably whenever I access the record - so that's it's always calculated "on the fly".

That's what Get ( RecordNumber ) is for. You can always get the current record number directly from the function, without needing a field.

  • Author

raybaudi :)

Ah-Ha! Sometimes it's the simplest thing - can't see the forest for the trees, you know? Maybe it's time to take a break...

I'm not assigning this number to the record - I'm only using it in combination with Get( TotalRecordCount) to display "record n of n" on the layout.

comment:

I didn't follow - how can I get this value and display it on the layout without a field?

thanks!

Put @@ on your layout. You can also find it under the Insert menu when in layout mode.

  • Author

LOL - duh!

Staring me in the face the entire time!

yes, it's definitely time to take a break...

But before I do, one more potentially dumb newbie question... any way to get the TOTAL record count on the layout as well, without needing a field?

See this thread.

http://fmforums.com/forum/showtopic.php?tid/199003/post/307416/#307416

  • 3 years later...

You can use "@@" to show the current record position in the Found Count

Create an account or sign in to comment

Important Information

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

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.