Copy link to clipboard
Copied
I have a calculated field that multiplies the unit price with quantity. But the total field has a zero in it if either field is zero.
I need to remove that zero from the calculated field.
Currently have the calculated field as:
TotalPrice = Qty1 * UnitPrice
Need to have TotalPrice blank if fields have a zero in it.
Thanks.
Copy link to clipboard
Copied
Hi slabby,
I am sorry that won't be possible. Calculated field shows 0 by default if there is no data entered in either of the fields.
Regards,
Meenakshi
Copy link to clipboard
Copied
Wrong. It's easily done with a custom validation script, like this one:
if (event.value==0) event.value = "";
Copy link to clipboard
Copied
so you are saying the code should be:
if (event.value==0) event.value = "";
this should be pasted into the calculated field section?
Could you be more specific with your answer?
The calculated field is TotalPrice.
Copy link to clipboard
Copied
As I wrote, it needs to be entered into the custom validation script.
It can also be used in the custom calculation script, but then you'll need to perform the entire calculation using JS.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now