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 3084 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I use the following calculation to determine the investment gain or loss between two successive records. The records are sorted by date descending.

Case

( Get(RecordNumber )>1;Total investment-GetNthRecord ( Total investment;Get(RecordNumber) -1 )

)

The calculation works well except that on the last record in the found set it results in a question mark. How can I eliminate the question mark? I would like the result to be be empty.

Posted

It's a number field. I'm in the process of developing the solution so there are only 14 records. I expect in use, it will grow only to a couple of hundred.

Posted

Sorry about that. I changed the calculation after I posted it. ! It is:

Case
( Get(RecordNumber ) ≥ 1;Total investment-GetNthRecord ( Total investment;Get(RecordNumber) +1 )
)

It determines the difference between the current and next records.

The file is attached.

Assets.fmp12

Posted

Well, if you're on the last record, then this part:

GetNthRecord ( Total investment ; Get(RecordNumber) +1 )

will error out.

You should change your test from:

Get (RecordNumber) ≥ 1

to:

Get (RecordNumber ) < Get (FoundCount)

That will make the last record empty and return a value for the first record (which does have a next record).

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