August 30, 201213 yr 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 ?
August 30, 201213 yr 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
August 30, 201213 yr 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.
August 30, 201213 yr 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.
August 31, 201213 yr 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, 201213 yr by Fitch : IsValid is reliable for its intended purpose. I'm just talking about testing for related records.
August 31, 201213 yr 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.
September 4, 201213 yr 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