ElseInstructionValue 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 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.
Syntax
public object ElseInstructionValue { get; }Public ReadOnly Property ElseInstructionValue As ObjectExamples
The following example builds a rule around an approval check box in a fillable form by using Instruction.ElseInstructionValue.
CheckFormField approvalField = new(false) { Name = "Approved" };
textControl.FormFields.Add(approvalField);
Instruction instruction = new(approvalField, Instruction.InstructionTypes.IsEnabled, true);
Console.WriteLine($"Else Instruction Value: {instruction.ElseInstructionValue}");
Console.WriteLine("Instruction is ready for use.");Dim approvalField As New CheckFormField(False) With { .Name = "Approved" }
textControl.FormFields.Add(approvalField)
Dim instruction As New Instruction(approvalField, Instruction.InstructionTypes.IsEnabled, True)
Console.WriteLine($"Else Instruction Value: {instruction.ElseInstructionValue}")
Console.WriteLine("Instruction is ready for use.")Limitations
Read only.
Remarks
The value represents the elseInstructionValue parameter value of the constructor's second overload. If that overload was not used to specify an else instruction value, the property returns a default value that depends on the set Instruction.InstructionTypes property value, the related form field type and/or the Instruction.InstructionValue property:
| Instruction.InstructionType property value | Default else instruction value |
|---|---|
| Instruction.InstructionTypes.IsEnabled | Negation of the Instruction.InstructionValue property value |
| Instruction.InstructionTypes.IsValueValid | Negation of the Instruction.InstructionValue property value |
| Instruction.InstructionTypes.SetValue (CheckFormField) | Negation of the Instruction.InstructionValue property value |
| Instruction.InstructionTypes.SetValue (TextFormField) | String.Empty |
| Instruction.InstructionTypes.SetValue (SelectionFormField) | String.Empty |
| Instruction.InstructionTypes.SetValue (DateFormField) | null |
| Instruction.InstructionTypes.SetItems (only SelectionFormField) | String[0] |