An object of the Instruction class is an element of the ConditionalInstruction class and represents actions that are execute´d when the corresponding conditions are fulfilled.

To specify such an instruction, the Instruction object has to be initialized with a FormField that is located inside the document. That form field is the object for which the desired actions are executed.

In this context, up to four different types of actions can be executed: Changing the FormField.Enabled property, marking the form field value as valid or invalid, setting a new value and replacing the SelectionFormField.Items array with another string array. On invoking an instance of the Instruction class, one of these types has to be set to the instructionType parameter by using one of the corresponding Instruction.InstructionTypes enumeration values.

To specify a value that is set by the specified action when the defined requirements of the ConditionalInstruction.Conditions array are fulfilled, the constructor's instructionValue parameter must be used. A value that is applied when the corresponding conditions are not fulfilled, can be set by the elseInstructionValue parameter of the constructor's second overload.

Syntax

public class Instruction : System.IComparable
Public Class Instruction
  Implements System.IComparable

Introduced: X18.

Constructors

Constructor Description
Instruction Initializes a new instance of the Instruction class to determine an action that is executed when the defined requirements of the ConditionalInstruction.Conditions array are fulfilled or not fulfilled.

Enumerations

Enumeration Description
InstructionTypes Determines the type of action to execute.

Properties

Property Description
ElseInstructionValue Gets the value that is set by the specified action when the defined requirements of the ConditionalInstruction.Conditions array are not fulfilled and the Instruction.IsElseInstructionEnabled property is set to true.
FormField Gets the FormField to which the specified action is executed.
InstructionType Gets the type of action to execute.
InstructionValue Gets the value that is set by the specified action when the defined requirements of the ConditionalInstruction.Conditions array are fulfilled.
IsElseInstructionEnabled Gets or sets a value indicating whether this Instruction allows to execute else instructions.
IsFormFieldChangeInstruction Gets or sets a value indicating whether this Instruction listens to value changes of the related conditions' form fields.
IsInitialInstruction Gets or sets a value indicating whether this Instruction is handled when the document is initialized as a form.