IfField Object
Description
Represents an MS Word specific IFFIELD field. Is used as a parameter for the addMergeField method.
Syntax
TXTextControl.IfFieldExamples
The following example demonstrates TXTextControl.IfField in a practical document-editing workflow. It represents an MS Word specific IFFIELD field. Is used as a parameter for the addMergeField method.
function inspectIfField(ifField) {
console.log("TXTextControl.IfField object:", ifField);
}Members
Properties
| Property | Description |
|---|---|
| expression1 | Specifies the first expression text that should be compared. This property must be a valid field name. |
| expression2 | Specifies the second expression text that should be compared to Expression1. |
| falseText | Specifies the text that should be displayed when the comparison is false. |
| operator | Specifies the comparison operator. Possible values are defined in TXTextControl.RelationalOperator. |
| preserveFormatting | Specifies whether the field's formatting should be preserved. |
| text | Specifies the initial text of the field. Let this property be null to use the default text "IF". |
| trueText | Specifies the text that should be displayed when the comparison is true. |