The ZERO function returns a value of zero if the template user leaves the number variable you specify unanswered. This function allows you to use the provided number variable in scripts without worrying about it halting your script if the variable has not been answered.
Function name |
ZERO |
Usage model | ZERO ( n:NUM ) |
Parameters | This function requires you to replace only one parameter: |
n: NUM |
The function evaluates the assigned to an unanswered zero or number variable. |
Result | A number value. |
Consider a script that calculates a total price that may or may not include a shipping cost. If there is a shipping cost, the amount is stored in the number variable "Shipping Cost NU".
TotalPriceNU = PriceNU + ZERO( ShippingCostNU )
The above script would correctly calculate your total price whether or not ShippingCostNU has been answered.
After you download the example template, you can import the template to any workspace to see this example code in action.