Joost Miltenburg Posted August 30, 2012 Posted August 30, 2012 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 ?
myopus Posted August 30, 2012 Posted August 30, 2012 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
Fitch Posted August 30, 2012 Posted August 30, 2012 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.
Joost Miltenburg Posted August 30, 2012 Author Posted August 30, 2012 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.
Fitch Posted August 31, 2012 Posted August 31, 2012 (edited) 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 August 31, 2012 by Fitch : IsValid is reliable for its intended purpose. I'm just talking about testing for related records.
Lee Smith Posted August 31, 2012 Posted August 31, 2012 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.
Joost Miltenburg Posted September 4, 2012 Author Posted September 4, 2012 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.
Recommended Posts
This topic is 4521 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 accountSign in
Already have an account? Sign in here.
Sign In Now