HotDocs Tips & Tricks

Tips, tricks and solutions with the HotDocs document assembly platform
Wednesday, October 17, 2007

Instruction Model: ZERO(NUM)


This tip covers the use of the instruction model: ZERO(NUM).  When is a number not a number?  When it has no value.  That doesn’t present an issue unless you start running calculations based on an unanswered number.  The solution is ZERO(NUM).

Article Content

What ZERO expression does is return the number value (if there is a number) or zero.

Use for a sum of different number variables

SET Fruit Total NU TO ZERO(Apples CNT) + ZERO(Oranges CNT) + ZERO(Tangerines CNT)

Use to provide a Total off a Repeat

0
REPEAT Inventory RPT
SET RESULT TO RESULT + ( ZERO(Item CNT) * ZERO(Item Price NU) )
END REPEAT

Posted by Seth
Page 1 of 1 pages

Statistics

Page Views: 5892
Page rendered in 0.3737 seconds
34 queries executed
Total Entries: 82
Most Recent Entry: 07/16/2008 11:19 am
Total Members: 5
Total Logged in members: 0
Total guests: 4
Most Recent Visitor on: 08/28/2008 01:36 pm
Most visitors ever: 87 on 11/07/2006 02:22 pm