I have a listview of various items and I would want there to be a dropdown box in the listview that lets the user change one of the items results. Is this possible?

I am trying to set a property that holds selection options (IE Option1, Option2..etc.). It gets populated but it doesn't show up inside the listview.

I tried read-variable in the Show-ListView like below but it did not work-

Get-ChildItem -Path $targetD -Recurse | Where-Object { $myItems.ContainsValue($_.TemplateName) } |
Show-ListView -Property @{Label="Name"; Expression={ $_.DisplayName } },
    @{Label="Path"; Expression={ $_.Paths.Path } },
    @{Label="Current"; Expression={ $_.Name } },
    @{Label="Desired"; Expression={ Read-Variable @props } }`
    -Title "Data to be transferred"`

I also considered perhaps setting each item in the list to have an already filled response of "none" that can be changed by the user, so that it isn't null when opening, but I wasn't sure if that's going to work either. Is it even possible to have selection fields in the listview at all?

1 Answer 1


In the reports view rendered when calling Show-ListView a "report actions" button can be added that modify the existing data.

Read more here.

In show you would perform the following steps.

  1. Save an item in the tree representing the action button.
  2. Assign a rule to the action button script so it only appears for a specified view name.
  3. Update your call to Show-ListView to specify the view name.

If you look at the Training module you should see a sample.

Item Example

The action appears at the top right of the report.

Report example

This action can then call whatever script you want.

Dialog Example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.