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

Recommended Posts

Posted

I need to get the total amount of the invoice but when i add summary field it slows down the database. i have alternative but it sometimes slow 

here is the script.

 

Performfind

SetVariable $total::Value:0

Loop

Go to first record

SetVariable $total::value::$total+amount

Go to next record

End Loop

 

Posted

Assuming that you have a relationship between the invoice and its invoice items then you can set the invoice total fields to the sum() of the invoice items.

Don't make that a calculation field but use the scripted approach to set the field.

 

As an aside: if you need to loop through records to pick up data, you can do that without actually going to the record: look into the GetNthRecord() function.

  • Like 1
Posted

IMHO, nothing is faster than a summary field. If you are experiencing performance issues (most likely as a result of displaying too many summary or unstored calculation values at once) and want to move to a scripted method, then take the summary field off your layout/s, but keep it in the table/s. Then set a number field directly to the summary (or sub-summary, as the case may be) value.

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