Hi,
I’ve got a Completed Tasks form in which I pick Task Items (from another form) into a Table Field. Some items are quantity related, others are time related. I created a formula to calculate the final costs. The fields I’ve got are:
Task Price (extracted from the Table)
Quantity
Start Time
End Time
Total Time (Calculation: [End Time] – [Start Time], displays 00:00 if ST en ET have no value)
Costs ( [Task Price] * SUM( [Quantity] ; ( [Total Time] /3600))
In case the Costs are related to a Quantity item, for layout purposes in the final Invoice form I would like to have an empty [Total Time] field if there are no values in [Start Time] end [End Time]. Is it possible to do this within the Calculation formula for [Total Time] which would state something like:
[End Time] – [Start Time]
display none if value [Total Time] = 00:00
(I guess it’s not possible as there are no “styling” Functions in the list)
If not possible, Brendan could you maybe add a checkbox to the Calculation options to be able to select something like “Display none if VALUE is 0” (or come up with a different/better solution ;-)
Thanks
Mike
Hi Mike,
Unfortunately at the moment that won’t work to display an empty value instead of 00:00. The reason being is that in order to return an empty value rather than a 0 value, you would need to set the Result Type to Text and return the empty string if a field value were empty. And by doing so you lose the ability to format your duration in terms of HH:MM. In Tap Forms 5.3, which I’ll have ready by the time Mojave and iOS 12 are release, will have a new Script engine in it whereby you can use JavaScript to write Calculation fields which gives you far more control over the output than the current Calculation field.