TX Text Control .NET Server

ConditionalInstruction Class

Class|Introduced in 28.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Core.dll
Install
dotnet add package TXTextControl.TextControl.Core.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

An object of the ConditionalInstruction class represents a list of form field related instructions that are executed when specific requirements, represented by an array of conditions, are fulfilled. Objects of that class can be added to an instance of the ConditionalInstructionCollection class. The TextControl validates the conditions and executes resulting instructions in case the document switches into the form protection mode and in case the related form fields have been changed. In order to switch the document into the form protection mode, the TextControl.EditMode property must be set to EditMode.ReadAndSelect and the TextControl.DocumentPermissions.ReadOnly property must be set to true. To execute Conditional Instructions in this context, the TextControl.IsFormFieldValidationEnabled property value must to be set to true.

Syntax

public class ConditionalInstruction

Examples

The following example builds a rule around an approval check box in a fillable form.

CheckFormField approvalField = new(false) { Name = "Approved" };
textControl.FormFields.Add(approvalField);
ConditionalInstruction conditionalInstruction = new();

Members

Constructors

ConstructorDescription
ConditionalInstructionInitializes a new instance of the ConditionalInstruction class.

Properties

PropertyDescription
AreElseInstructionsHandledNot described in the reference. public bool AreElseInstructionsHandled { get; set; }
ConditionsGets or sets an array of conditions, that represent the requirements that has to be fulfilled to execute the specified instructions. Each element of that array is linked by a logical connective connector with its previous element. Based on these relationships, in which the individual conditions relate to each other, it is evaluated whether the requirements to execute the instructions has been fulfilled.
InstructionsGets or sets an array of instructions that are executed when the specified conditions are fulfilled.
NameGets or sets a name of the conditional instruction.

Methods

MethodDescription
CopyReturns a copy of this ConditionalInstruction object.