Jump to content

calculation not refreshing in FM12


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

Recommended Posts

LS !

Situation :

All fields are being displayed on the layout.

I have salesinvoices with lines. The total is of course situated in the salesvoice itself.

The calc is something like this :

total_invoice_ex_vat :

Case(

IsValid( fvf_FVFR_|_phasing::_k_sales_invoice_id ) ;

Sum( fvf_FVFR_|_phasing::_c_total_sales_ex_vat ) ;

Sum( fvf_FVFR_|_k_sales_invoice_id::_c_total_sales_ex_vat )

)

However, when a value of _c_total_sales_ex_vat changes, the result is not displayed / refreshed correctly. If I click into the total_invoice_ex_vat-field then the value is refreshed.

I can probably do a go to preview > go to browse mode, but is so FM6.

Anyone has any ideas ?

Link to comment
Share on other sites

You might try making c_total_sales_ex_vat a stored auto-entered total rather than a calculated field. I'd recommend you give some thought to storing your totals in general if you anticipate more than a few thousand records.

By the way, I'd also recommend using IsEmpty rather than IsValid for testing the existence of related records.

Link to comment
Share on other sites

By the way, I'd also recommend using IsEmpty rather than IsValid for testing the existence of related records.

Could you give me a reason for this ? I was taught this method by a FMGuru from FMI years ago.

Hi,

I hope someone will have a better idea for you

but in my case, I set one commit trigger on the

number field of invoice's line.

Gilles

Hi,

I hope someone will have a better idea for you

but in my case, I set one commit trigger on the

number field of invoice's line.

Gilles

Yes, I thought of that as well, but decided on the onRecordCommit-trigger and just set the script to just 'refresh window'. It seems to work.

Link to comment
Share on other sites

Could you give me a reason for this ? I was taught this method by a FMGuru from FMI years ago.

See the FAQ at the end of this article:

http://sixfriedrice....elated-records/

This discussion surfaces probably at least once a year, including an epic (68 response) thread on the FMPUG list back in April. To summarize:

IsEmpty is 100% reliable. IsValid is not.

Edited by Fitch
: IsValid is reliable for its intended purpose. I'm just talking about testing for related records.
Link to comment
Share on other sites

Jimmy Jones, of FileMaker Inc., brought this up a long time ago in the Friday Night Chat. This was about the time when FileMaker Pro 5 was the current version.

As Tom stated, it comes up at least once a year.

Link to comment
Share on other sites

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