I have tried everything without success to get a calculation field to display a zero if it results in null.
The code below works (as with many other possibilities) but only when I open the field and resave it - otherwise it remains empty. Can anyone explain why the calculation field is not responsive - is it a bug?
I am not sure I understood your problem correctly in general, so sorry if this misses it massively. But maybe simply adding this â@Record IDâ helps you.
Then, I think your video can only be seen by you, so I am not sure others are able to see it. If you want you can try the link in a private tab to check it.
OK, I have understood that its not a bug and is intention that the field remains empty if there is no value. Still havenât worked out how to use use @RecordID to get the calculation to display a zero instead of an empty field
In fact this issue has already been raised and clarified by Leo. I have a calculation field (App A) that sums the amounts of a field in record in a related app (App B). However, when the record in App B does not exist yet, the calculation field in App A (that has just been created) produces no result and remains empty I want the calculation field in App A to display a zero in this case. Hope that was clearer. Iâm not sure that there is a solution for this .
Thanks but it doesnât solve my problem. Perhaps my screenshots below clarify what I see.
Record 2 in App B has no value (not even null) as I have understood Leoâs comment : 'Currently by design calculations will only calculate for a new record when the referenced fields (inside the calculation script) have a value.
The workaround is to create a a related record in App A with no value. This allows the record in App B to trigger the calculation for the first time. Is there a more elegant way of achieving this.
In App A I have a list of payments
In App B I have a list of invoices.
In another app I have a contract which contains a calculation field that summarizes in a table all related invoices with the values of their respective payments. However, if there is no payment value yet for a given invoice, then the invoice with no payment value does not display.
Thanks to everyoneâs comments - Iâm new to Tape so its much appreciated.
This works too. So the conclusion is that calling any other field at the beginning triggers the first calculation and provides any value than can be change immediately.