We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0170994 commit 4f57dcbCopy full SHA for 4f57dcb
appendix/common/read-variable.md
@@ -156,7 +156,7 @@ Help Author: Adam Najmanowicz, Michael West
156
157
### EXAMPLE 1
158
159
-The following provides a dialog with a dropdown of options.
+The following provides a dialog with a dropdown of options, and how to read the selected value.
160
161
```powershell
162
$options = @{
@@ -175,7 +175,12 @@ $props = @{
175
ShowHints = $true
176
}
177
178
-Read-Variable @props
+$result = Read-Variable @props
179
+
180
+if($result -eq "ok")
181
+{
182
+ Write-Host "You chose: $($selectedOption)"
183
+}
184
```
185
186
### EXAMPLE 2
@@ -235,6 +240,9 @@ if($result -ne "ok")
235
240
236
241
### EXAMPLE 4
237
242
243
+```
244
245
238
246
239
247
## Related Topics
248
0 commit comments