@IsDocBeingMailed (Formula Language)
Checks the current status of the document and returns 1 (True) if the document is being mailed; otherwise, returns 0 (False).
Syntax
@IsDocBeingMailed
Return value
flag
Boolean
- 1 (True) indicates that the document is actually being mailed
- 0 (False) indicates that the document is not being mailed
Usage
Use @IsDocBeingMailed in field formulas. This function is useful for calculating the number of times the user has mailed a document, including the number of times the document has been forwarded. It is also useful for changing a document during mailing; for example, you can change a document's form when it is mailed.
It has limited usefulness in toolbar button, hotspot, and form action formulas. This function does not work in column, selection, agent, window title, form, or view action formulas.
You cannot use this function in Web applications.
Examples
- This example returns 1 when the document is being mailed.
@IsDocBeingMailed
- This example returns 0 before and after the document has been
mailed.
@IsDocBeingMailed
- This formula is used in a field to calculate the number of times
a document has been mailed. When this formula is provided as the definition
of a computed field called TimesMailed, the field is initialized to
0 (since the document has not been mailed). TimesMailed is incremented
with every mail operation, so if the document has been mailed once,
the contents become 1, and the count increases by one each time the
document is mailed.
@If(@IsUnavailable(TimesMailed);0; TimesMailed+@IsDocBeingMailed)