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

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

Recommended Posts

Posted

I have 2 fields:

Revision Date

Revision Number

I want to display the last record of Revision Date and Revision Number as part of a header for a report. I'm tried to create a calculation field, but I am not good with scripting in FMP. Also, I have tried to sort the data, but this doesn't seem to work at all in a header.

Any help would be greatly appreciated. Thank you very much in advance!

Posted

Normally, a field placed in the header displays data from the first record on the page. To display data from the last record in the found set, define an unstored calculation field =

GetNthRecord ( YourField ; Get (FoundCount) )

and place in the header.

Alternatively, use a global field and set it by script (after finding and sorting the reported records):

Go to Record [Last]

Set Field [ GlobalField ; YourField ]

Posted

Thank you so very very much. Your awesome and have helped me several times now. I owe you one or two or ten...

Posted

I also found alternatively, you can place a portal in the header to show only one row and make the background and border invisible, then sort it in descending order.

Posted

Not really - because a relationship ignores both the found set and local sorting.

So, if for example you do not want to include the last record in the report, this will bomb (unless your relationship is based on a recursive custom function that reproduces the found set in a portal - but let's not go there...).

Posted

Well, I don't know what your relationship is, and what your found set is. Still, I believe that if you go to the last record and omit it, you will see the difference.

Posted

Ahh, yes. I data is stored in a seperate table referenced via a relationship and placed into a portal. That data is never part of a find, but is sorted via the portal.

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