Skip to content

Commit 0d75cd3

Browse files
authored
Feature/update variable editor documentation (#263)
1 parent 3c2844b commit 0d75cd3

28 files changed

Lines changed: 173 additions & 117 deletions

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

Lines changed: 57 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,96 +7,114 @@ weight: 100
77

88
# {{% param title %}}
99

10-
{{< workinprogress >}}
11-
1210
## Summary
1311

14-
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" >}}
1515

1616
## Using Variables
1717

18-
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 it.
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.
1921

20-
- You can use any available variable.
21-
- Available variables are restricted by the scope of the currently selected block
22-
- 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.
2323

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

26-
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" >}}
2729

2830
### Scoped Variables
2931

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

32-
- Available variables are scoped by the workspace of the block selected
33-
- Can see variables of the same name that are on accessible scopes
34-
- 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.
3535

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

3838
### Accessing Variable Properties or Indexes
3939

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

42-
- Properties and indexes can be accessed from the Variable editor
43-
- 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.
4443

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

47-
## Missing Variables
46+
Conversely, If the data type contained in the variable is dynamic and the property or index does not exist, a translation error will not be displayed but a runtime exception will be raised when the flow is executed.
47+
48+
{{< figure src="/images/Variable Editor - Variable Properties.png">}}
4849

49-
TODO:
50+
## Missing Variables
5051

51-
- If a variable does not exist, then a orange border will be shown around the Variable editor
52-
- It is possible to create a new variable from a missing one using the variable editor
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][Creating Variables] a new variable of that name using the Variable Editor.
5353

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

5656
## Creating Variables
5757

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

60-
- If a variable does not already exist, the variable editor can be used to create a new one at the current scope
61-
- 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.
6263

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

6566
## Renaming Variables
6667

67-
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][Creating Variables] 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.
6871

69-
- 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
70-
- If the variable name is invalid ([C# identifier naming rules][]) then there will be no option to rename the variable
71-
- Renaming a variable does not include any index or method expressions (e.g. renaming to `($)NewVar.ToString()` will rename the selected variable to `($)NewVar`)
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.
7273

73-
TODO: Image of option to rename a variable
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.
75+
76+
{{< figure src="/images/Variable Editor - Rename Variable.png" >}}
7477

7578
## Remarks
7679

7780
### Known Limitations
7881

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

81-
- 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
82-
- 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.
8385

8486
## See Also
8587

8688
### Related Concepts
8789

88-
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?]
8995

9096
### Related Blocks
9197

92-
TODO
98+
* [All Blocks][Blocks]
9399

94100
### Related Data Types
95101

96-
TODO
102+
* [All Data Types][Reference Data Types]
97103

98104
### External Documentation
99105

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

102120
[C# identifier naming rules]: {{< url path="MSDocs.CSharp.IdentifierNamingRules" >}}

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

Lines changed: 57 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,96 +7,114 @@ weight: 100
77

88
# {{% param title %}}
99

10-
{{< workinprogress >}}
11-
1210
## Summary
1311

14-
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" >}}
1515

1616
## Using Variables
1717

18-
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 it.
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.
1921

20-
- You can use any available variable.
21-
- Available variables are restricted by the scope of the currently selected block
22-
- 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.
2323

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

26-
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" >}}
2729

2830
### Scoped Variables
2931

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

32-
- Available variables are scoped by the workspace of the block selected
33-
- Can see variables of the same name that are on accessible scopes
34-
- 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.
3535

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

3838
### Accessing Variable Properties or Indexes
3939

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

42-
- Properties and indexes can be accessed from the Variable editor
43-
- 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.
4443

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

47-
## Missing Variables
46+
Conversely, If the data type contained in the variable is dynamic and the property or index does not exist, a translation error will not be displayed but a runtime exception will be raised when the flow is executed.
47+
48+
{{< figure src="/images/Variable Editor - Variable Properties.png">}}
4849

49-
TODO:
50+
## Missing Variables
5051

51-
- If a variable does not exist, then a orange border will be shown around the Variable editor
52-
- It is possible to create a new variable from a missing one using the variable editor
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][Creating Variables] a new variable of that name using the Variable Editor.
5353

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

5656
## Creating Variables
5757

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

60-
- If a variable does not already exist, the variable editor can be used to create a new one at the current scope
61-
- 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.
6263

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

6566
## Renaming Variables
6667

67-
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][Creating Variables] 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.
6871

69-
- 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
70-
- If the variable name is invalid ([C# identifier naming rules][]) then there will be no option to rename the variable
71-
- Renaming a variable does not include any index or method expressions (e.g. renaming to `($)NewVar.ToString()` will rename the selected variable to `($)NewVar`)
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.
7273

73-
TODO: Image of option to rename a variable
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.
75+
76+
{{< figure src="/images/Variable Editor - Rename Variable.png" >}}
7477

7578
## Remarks
7679

7780
### Known Limitations
7881

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

81-
- 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
82-
- 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.
8385

8486
## See Also
8587

8688
### Related Concepts
8789

88-
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?]
8995

9096
### Related Blocks
9197

92-
TODO
98+
* [All Blocks][Blocks]
9399

94100
### Related Data Types
95101

96-
TODO
102+
* [All Data Types][Reference Data Types]
97103

98104
### External Documentation
99105

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

102120
[C# identifier naming rules]: {{< url path="MSDocs.CSharp.IdentifierNamingRules" >}}

0 commit comments

Comments
 (0)