IsElseInstructionEnabled Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Gets or sets a value indicating whether this Instruction allows to execute else instructions. If this property is set to true, the else instruction value is applied by the specified action when the defined requirements of the ConditionalInstruction.Conditions array are not fulfilled. The default value is false, if no else instruction value was set by the instruction constructor. Otherwise true.
Syntax
public bool IsElseInstructionEnabled { get; set; }Public Property IsElseInstructionEnabled As BooleanExamples
The following example builds a rule around an approval check box in a fillable form by using Instruction.IsElseInstructionEnabled.
CheckFormField approvalField = new(false) { Name = "Approved" };
textControl.FormFields.Add(approvalField);
Instruction instruction = new(approvalField, Instruction.InstructionTypes.IsEnabled, true);
instruction.IsElseInstructionEnabled = true;
if (instruction.IsElseInstructionEnabled)
{
Console.WriteLine("Instruction: Is Else Instruction Enabled is enabled.");
}Dim approvalField As New CheckFormField(False) With { .Name = "Approved" }
textControl.FormFields.Add(approvalField)
Dim instruction As New Instruction(approvalField, Instruction.InstructionTypes.IsEnabled, True)
instruction.IsElseInstructionEnabled = True
If instruction.IsElseInstructionEnabled Then
Console.WriteLine("Instruction: Is Else Instruction Enabled is enabled.")
End If