ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
35 stars 2 forks source link

Add table selected rows support to UDStepper #1207

Open ad-85 opened 2 years ago

ad-85 commented 2 years ago

Summary of the new feature / enhancement

I would like to be able to use New-UDTable with ShowSelect enabled inside New-UDStep and have it capture the selected row in the Stepper.

Proposed technical implementation details (optional)

Capture the selected rows of tables in the $EventData.Context property as other form controls are within a Stepper.

neo-level commented 2 years ago

Hi, I had a similar challenge before. You can do it as well by using the stepper validation check to retrieve the rows with (Get-UDElement -Id 'table').SelectedRows, do this in the correct step and you have what you need, I use a session variable for this so I can easily use it in the other steps.