# Instruction.ElseInstructionValue Property

> 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.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > Instruction.ElseInstructionValue Property
- **946 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/elseinstructionvalue-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/elseinstructionvalue-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/elseinstructionvalue-property/llms-full.txt

---

### Description

Gets the value that is set by the specified action when the defined requirements of the [ConditionalInstruction.Conditions](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/conditionalinstruction/conditions-property/llms-full.txt) array are not fulfilled and the [Instruction.IsElseInstructionEnabled](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/iselseinstructionenabled-property/llms-full.txt) property is set to true.

### Syntax

```csharp
public object ElseInstructionValue { get; }
```

```vbnet
Public ReadOnly Property ElseInstructionValue As Object
```

### Examples

The following example builds a rule around an approval check box in a fillable form by using `Instruction.ElseInstructionValue`.

```csharp
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.");
```

```vbnet
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](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/instructiontypes-enumeration/llms-full.txt) property value, the [related form field](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/formfield-property/llms-full.txt) type and/or the [Instruction.InstructionValue](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/instructionvalue-property/llms-full.txt) 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\] |

---

## Nearby

- **Previous:** [Instruction Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/constructor/llms-full.txt)
- **Next:** [Instruction.FormField Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/instruction/formfield-property/llms-full.txt)
