Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

calculation not refreshing in FM12

Featured Replies

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 ?

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

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.

  • Author

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.

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.

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.

  • Author

OK. Thnx !

I'll try to break this habit of isValid.

That doesn't answer my question about why the calc isn't refreshing. Even with the isempty() calculation.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.