Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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!

Posted

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.

Posted

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.

Posted

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!

Posted

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

Posted

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?

Posted

See this thread.

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

  • 3 years later...

This topic is 4441 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.