Conditional fields

Top  Previous  Next

{?fieldname='truevalue','falsevalue'}

This construct determines whether or not a field value is present in the data-field named fieldname, then returns the value given by truevalue parameter if it exists, or falsevalue if it does not exist. If either truevalue or falsevalue are omitted, the default values T (for truevalue) or F (for falsevalue) are returned. To just return the default values T if the field  value exists or F if it doesn't, it is sufficient to use:

{?fieldname}

When the truevalue /falsevalue parameters are single 'words' they need not be in quotes, but note that # characters that are not in quotes have a special meaning.

If a parameter is defined as one or more "#" characters, the value returned will be the previously generated value incremented by 1. The initial value is set at 0 so that on first use the value returned will be 1. Similarly, an invalid value would be initialized to 0 so that on first use the value returned will be 1. The number of # characters corresponds to the number of digits in the value generated and must not be exceeded; values needing fewer digits are filled out with leading space characters.

Examples:

{?Action=Yes,No}

{?Status='Mrs. ','Ms. '}

{?name}{?telephone}

{?count=###,1}