Skip to content

Commit e0722c6

Browse files
author
Donna-Marie Smith
committed
added variable editor content ready for PO Review
1 parent a3e8003 commit e0722c6

10 files changed

Lines changed: 57 additions & 38 deletions

content/en/docs/2026.3/Reference/Concepts/fundamentals/blocks/block-properties/property-editors/variable-editor.md

Lines changed: 55 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,95 +7,112 @@ weight: 100
77

88
# {{% param title %}}
99

10-
1110
## Summary
1211

13-
TODO
12+
The Variable Editor is used to reference any available [variable][What is a Variable?] that is in scope of the [block][What is a Block?] and can be used with most [block properties][What is a Block Property?].
13+
14+
{{< figure src="/images/Variable Editor.png" >}}
1415

1516
## Using Variables
1617

17-
TODO:
18+
The variables available to the Variable Editor are restricted by the [scope][Variable Scopes] of the currently selected block, which in turn is determined by the [workspace][What is a Workspace?] containing the selected block.
19+
20+
The variable is referenced by either entering the variable name (without the prefix of `($)`) into the Variable Editor, or by selecting an available variable from the dropdown, which is revealed when the Variable Editor is selected.
1821

19-
- You can use any available variable.
20-
- Available variables are restricted by the scope of the currently selected block
21-
- All available variables will be shown when the variable editor is empty; typing in the editor will filter the available variables with those that match (contains text) on either the variable name or scope
22+
If the editor’s field is empty, all available variables will be displayed in the dropdown.
2223

23-
TODO: Image of using a variable
24+
{{< figure src="/images/Variable Editor - Select Variable.png" >}}
2425

25-
TODO: Image of selecting available variables
26+
Typing characters into the Variable Editor will filter the available variables displayed to those with their name or scope containing a case-insensitive match of the text entered.
27+
28+
{{< figure src="/images/Variable Editor - Filter Variables.png" >}}
2629

2730
### Scoped Variables
2831

29-
TODO:
32+
Variables are scoped by the workspace that contains the selected block. {{% ctx %}} uses the principle of inherited scope in that variables available for use in the Variable Editor are those created in the current workspace and those inherited from variables scoped to the parent workspace.
3033

31-
- Available variables are scoped by the workspace of the block selected
32-
- Can see variables of the same name that are on accessible scopes
33-
- Link to known limitation. If there are two or more variables with the same name, the variable with the closest scope will be always used even if another is selected
34+
If two or more different variables have the same case-insensitive variable name but belong to different scopes, only the variable with the closest scope to the scope of the selected block will be used or displayed in the Variable Editor dropdown.
3435

35-
TODO: Image of scoped variables (different names and same names)
36+
{{< figure src="/images/Variable Editor - Scoped Variables.png" >}}
3637

3738
### Accessing Variable Properties or Indexes
3839

39-
TODO:
40+
[Properties][Variable Properties] and [indexes][Variable Indexes] of the data type contained in a variable for both Input and Output properties may be expressed in the Variable Editor.
4041

41-
- Properties and indexes can be accessed from the Variable editor
42-
- Translation error shown in messages viewer when using properties or indexes incorrectly for variable that is not dynamic
42+
However, if an index is used with a variable in an output property, the variable must have already been created and instantiated to a suitable data type, otherwise a translation error will be displayed when an attempt to execute the flow is made.
4343

44-
TODO: Image of accessing variable property and index
44+
In addition, for input or output property types, if the data type contained in the variable is not dynamic and the property or index used does not exist, a translation error will be displayed when an attempt to execute the flow is made.
4545

46-
## Missing Variables
46+
Conversely, If the data type contained in the variable is dynamic and the property or index does not exist, translation error will not be displayed but a runtime exception will be raised when the flow is executed.
4747

48-
TODO:
48+
{{< figure src="/images/Variable Editor - Variable Properties.png">}}
4949

50-
- If a variable does not exist, then a orange border will be shown around the Variable editor
51-
- It is possible to create a new variable from a missing one using the variable editor
50+
## Missing Variables
51+
52+
If the text entered in the Variable Editor does not match that of a created variable, i.e., the variable does not exist, then a red border with be shown around the Variable Editor. However, it is possible to create a new variable of that name using the Variable Editor.
5253

53-
TODO: Image of orange border for missing variables
54+
{{< figure src="/images/Variable Editor - Missing Variable.png" >}}
5455

5556
## Creating Variables
5657

57-
TODO:
58+
If a variable does not already exist, the Variable Editor can be used to create a new variable, scoped to the current workspace.
59+
60+
To create a new variable, enter the new variable’s name in the Variable Editor. The dropdown will reveal a filtered list of available variables, where the name or scope of variable contains the case-insensitive text entered, plus the option to create a new variable.
5861

59-
- If a variable does not already exist, the variable editor can be used to create a new one at the current scope
60-
- If the variable name is invalid ([C# identifier naming rules][]) then there will be no option to create a new variable
62+
If the text entered does not conform to the variable naming rules ([C# identifier naming rules][]), then the option to create a new variable will not be displayed.
6163

62-
TODO: Image of option to create a new variable
64+
{{< figure src="/images/Variable Editor - Create Variable.png" >}}
6365

6466
## Renaming Variables
6567

66-
TODO:
68+
If the Variable Editor already contains a reference to an existing variable, entering the name for a variable that does not exist will not only offer the option to create a new variable in the dropdown, but it will also display the option to rename the existing variable to that of the name entered.
69+
70+
If an existing variable is renamed in the Variable Editor, then all other references to the existing variable will also be changed to the new variable name throughout the flow.
71+
72+
If the text entered does not conform to the variable naming rules ([C# identifier naming rules][]), then the option to rename the variable will not be displayed.
6773

68-
- If a variable editor already contains a reference to a variable that exists, typing the name of a non-existent variable will provide the option to rename the previously selected variable (and all references to it within the flow) to the new variable name
69-
- If the variable name is invalid ([C# identifier naming rules][]) then there will be no option to rename the variable
70-
- Renaming a variable does not include any index or method expressions (e.g. renaming to `($)NewVar.ToString()` will rename the selected variable to `($)NewVar`)
74+
Renaming a variable will keep intact any indexes or property references to the object contained in the variable; any changes made to the indexes or property references will not affect the indexes or property references elsewhere in the flow.
7175

72-
TODO: Image of option to rename a variable
76+
{{< figure src="/images/Variable Editor - Rename Variable.png" >}}
7377

7478
## Remarks
7579

7680
### Known Limitations
7781

78-
TODO:
82+
* When two or more characters are entered into the Variable Editor, causing the dropdown to display a list of available variables, the variable name of the first closest match is sometimes displayed in the Variable Editor, e.g., entering My will cause MyVar to be displayed in the Variable Editor, however, pressing the Tab key will not automatically enter the full variable name. The variable name must either be entered in full, or an option on the dropdown must be selected.
7983

80-
- If there are two or more variables with the same name, the variable with the closest scope will be always used even if another is selected
81-
- Currently, available variables are not restricted based on the type of the variable and if that is valid for the selected property
84+
* Variable references used elsewhere in the flow as the index to other variables, e.g. the variable Var2 used in the reference Var1[($)Var2], will remain referencing Var2 even when the variable Var2 is renamed in the Variable Editor or Variables Grid.
8285

8386
## See Also
8487

8588
### Related Concepts
8689

87-
TODO
90+
* [Blocks][What is a Block?]
91+
* [Block Properties][What is a Block Property?]
92+
* [Variable Scopes][]
93+
* [Variables][What is a Variable?]
94+
* [Workspaces][What is a Workspace?]
8895

8996
### Related Blocks
9097

91-
TODO
98+
* [All Blocks][Blocks]
9299

93100
### Related Data Types
94101

95-
TODO
102+
* [All Data Types][Reference Data Types]
96103

97104
### External Documentation
98105

99-
TODO
106+
* [C# identifier naming rules][]
107+
108+
[Blocks]: {{< url path="Cortex.Reference.Blocks.MainDoc" >}}
109+
[Reference Data Types]: {{< url path="Cortex.Reference.DataTypes.MainDoc" >}}
110+
[Variable Indexes]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Variables.UsingVariables.Indexes" >}}
111+
[Variable Properties]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Variables.UsingVariables.Properties" >}}
112+
[Variable Scopes]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Variables.VariableScopes.MainDoc" >}}
113+
[What is a Block?]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.WhatIsABlock.MainDoc" >}}
114+
[What is a Block Property?]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.MainDoc" >}}
115+
[What is a Variable?]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Variables.WhatIsAVariable.MainDoc" >}}
116+
[What is a Workspace?]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Workspaces.WhatIsAWorkspace.MainDoc" >}}
100117

101118
[C# identifier naming rules]: {{< url path="MSDocs.CSharp.IdentifierNamingRules" >}}
17.8 KB
Loading
23.6 KB
Loading
12 KB
Loading
21.1 KB
Loading
21.9 KB
Loading
23.2 KB
Loading
13.3 KB
Loading
12.1 KB
Loading

data/urls.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,6 +2142,8 @@
21422142
[Cortex.Reference.Concepts.Fundamentals.Variables.UsingVariables]
21432143
MainDoc = "/docs/reference/concepts/fundamentals/variables/using-variables/"
21442144
ExpressionEditor = "/docs/reference/concepts/fundamentals/variables/using-variables/#expression-editor"
2145+
Indexes = "/docs/reference/concepts/fundamentals/variables/using-variables/#using-items-in-collections"
2146+
Properties = "/docs/reference/concepts/fundamentals/variables/using-variables/#using-properties-of-data-types"
21452147
VariableEditor = "/docs/reference/concepts/fundamentals/variables/using-variables/#variable-editor"
21462148
[Cortex.Reference.Concepts.Fundamentals.Variables.VariableScopes]
21472149
MainDoc = "/docs/reference/concepts/fundamentals/variables/variable-scopes/"

0 commit comments

Comments
 (0)