hi,
I have a dashboard/app that shows data in a table with the option to filter the columns.
I have a column "status" which can be "active", "disabled", "pending" or "deleted" with the filtertype "multiselect" it works fine.
What I want to achieve is that the table when loaded shows the entries with the status "pre-filtered" to "active".
Can this be done?
KR
G.
I've found this - but no information how it has eventually been implemented and which filtertypes it supports (issue on github talking about "autocomplete" - me using "multiselect") 🙃
https://github.com/ironmansoftware/powershell-universal/issues/1182
Hello @Guenther Schmitz
Thank you for the details.
I understand that the MultiSelect filter itself is working correctly, but you would like the table to load with the status column already filtered to "active".
I also reviewed the GitHub issue you referenced. It is relevant to initializing table filters, but it does not clearly confirm how this should be configured for a MultiSelect filter.
Could you please share:
• Your exact PowerShell Universal version.
• A minimal example of the New-UDTable and the status column definition.
• Whether the table is using -Data or -LoadData.
With that information, I can verify the behavior specifically for your implementation rather than assuming that the older AutoComplete example applies to MultiSelect as well.
Because this is a public forum, please sanitize all evidence before posting. Remove credentials, tokens, license keys, cookies, private keys, full connection strings, email addresses, usernames, customer data, tenant or account identifiers, internal domains, hostnames, IP addresses, and private URLs. Please do not upload unredacted HAR files, memory dumps, database backups, or complete configuration files to this public thread.
Best regards,
Ruben Tapia
hi @rubentapia,
we are still on PSU v4.5.6
Please find hereunder a minimal example (where you can see that I use -Data).
$Data = 1..10 | ForEach-Object {
[PSCustomObject]@{
CustomerDisplayname = "Customer $_"
RelationshipEndDateTime = (Get-Date).AddDays($_)
RelationshipAutoExtendDuration = 'PT{0}D' -f $_
RoleAssignmentName = "Role $_"
SecurityGroupName = "Group $_"
Status = (Get-Random -Minimum 0 -Maximum 2) -eq 0 ? 'Active' : 'Disabled'
}
}
New-UDParagraph -Content {
New-UDTable -Data $Data -Columns @(
New-UDTableColumn -Property 'CustomerDisplayname' -Title 'Customer Display Name' -ShowFilter -ShowSort -DefaultSortColumn $true
New-UDTableColumn -Property 'RelationshipEndDateTime' -Title 'Relationship End Date Time' -ShowSort -OnRender {
$EventData.RelationshipEndDateTime.ToString('yyyy-MM-dd HH:mm:ss')
}
New-UDTableColumn -Property 'RelationshipAutoExtendDuration' -Title 'Relationship Auto Extend' -OnRender {
if ($EventData.RelationshipAutoExtendDuration -eq 'PT0S') {
New-UDIcon -Icon 'close' -Color 'red'
} else {
New-UDIcon -Icon 'check' -Color 'green'
}
} -ShowFilter -ShowSort -FilterType select
New-UDTableColumn -Property 'RoleAssignmentName' -Title 'Role Assignment' -ShowFilter -ShowSort -Render {
New-UDLink -Text $EventData.RoleAssignmentName -Url "#"
}
New-UDTableColumn -Property 'SecurityGroupName' -Title 'Security Group' -ShowFilter -ShowSort -Render {
New-UDLink -Text $EventData.SecurityGroupName -Url "#"
}
New-UDTableColumn -Property 'Status' -Title 'Status' -ShowFilter -ShowSort -FilterType autocomplete
) -ShowPagination -PageSize 25 -StickyHeader
}
KR
G.
Hello @Guenther Schmitz
Thank you for providing the PSU version and the minimal example.
Since you are running PSU 4.5.6, I will reproduce the scenario against that same version in an isolated Docker environment and use your -Data based implementation as the reference.
I also noticed that your original post referred to a MultiSelect filter, while the sample currently uses:
-FilterType autocomplete
I will take that difference into account and validate the relevant filter behavior so we do not assume that both filter types behave the same way.
Once the reproduction is complete, I will share the findings here. If the testing identifies behavior that requires a product change, the feasibility of making a change specifically for the 4.5.6 branch would need to be assessed by the Development team. I do not want to make any commitment regarding changes to that version before the behavior and scope are confirmed.
Best regards,
Ruben Tapia
hi @rubentapia,
I did mean to create an example with multiselect - I overlooked the filtertype (actually because I based the example on a different - simpler - table 🫣).
Please do use multiselect.
KR
G.
Thanks @Guenther Schmitz will adjust my lab.
Regards,
Hello @Guenther Schmitz
Thank you for the clarification.
I completed the reproduction using PSU 4.5.6 with New-UDTable -Data and a Status column configured with FilterType multiselect.
The multiselect filter itself works as expected when used interactively. However, in PSU 4.5.6 there is no supported mechanism to load the table with that column filter already initialized and applied to "Active".
Based on the testing and the implementation available in that version, this is best characterized as a product limitation in the 4.5.6 branch rather than a failure of the multiselect filter itself.
I was able to reproduce the requested scenario consistently, so no additional information is required from your side at this point.
I will check internally whether there are any supported options for this behavior in the 4.5.6 branch, or whether addressing it would require a product change. Since this is an older PSU version, I do not want to make any commitment regarding a change or backport before that feasibility is reviewed.
I will update the thread once I have more information.
Best regards,
Ruben Tapia
hi @rubentapia,
as of yesterday evening we are now running 2026.3.3
KR
G.
Hello @Guenther Schmitz
Thank you for the update.
Since you are now running PSU 2026.3.3, could you please confirm whether the original behavior has changed after the upgrade?
Specifically, are you now able to load the table with the Status MultiSelect filter already initialized and applied to "Active", or does the table still load with the filter empty?
This will help determine whether any additional testing is needed against 2026.3.3.
Best regards,
Ruben Tapia
hi Ruben,
the table and the multiselect feature did work just fine with the old version and also do still work with the new version.
The multiselect filter lists all different values for "status" and also the "all" option is listed.
What I wanted to ask for was if it would be possible to have the multiselect filtered right on first load.
So if a user navigates to the page with the table the first time the entries only show the ones with states "active". The user should then be able to use the filter and select "all" or any other status available.
I am making this parameter FilterSelect up - but this is what I was looking for:
New-UDTableColumn -Property 'Status' -Title 'Status' -ShowFilter -ShowSort -FilterType multiselect -FilterSelect 'Active'
As of now the table is loaded unfiltered and users will have to select the state manually.
KR
G.
hi @rubentapia,
I came up with this solution - not as elegant as I wanted it to be, but a working solution for now.
New-UDPage -Url '/test' -Name 'Test' -Content {
New-UDCard -Title 'a demo table' -TitleAlignment center -Content {
New-UDDynamic -Content {
$Session:TableData = 1..10 | ForEach-Object {
[PSCustomObject]@{
CustomerDisplayname = "Customer $_"
RelationshipEndDateTime = (Get-Date).AddDays($_)
RelationshipAutoExtendDuration = 'PT{0}D' -f $_
RoleAssignmentName = "Role $_"
SecurityGroupName = "Group $_"
Status = (Get-Random -Minimum 0 -Maximum 2) -eq 0 ? 'Active' : 'Disabled'
}
}
$Data = $Session:TableData | Where-Object { $_.Status -eq 'Active' }
New-UDElement -Tag 'div' -Id 'switchWrapper' -Content {
New-UDSwitch -Id 'activeSwitch' -Checked $false -CheckedLabel 'show all' -UncheckedLabel 'show only active' -OnChange {
Show-UDModal -Persistent -Content {
New-UDTypography -Text 'Updating table to ...' -Variant h4
New-UDProgress
}
if ((Get-UDElement -Id 'activeSwitch' -Property 'Checked')) {
$Data = $Session:TableData
} else {
$Data = $Session:TableData | Where-Object { $_.Status -eq 'Active' }
}
Set-UDElement -Id 'aTable' -Properties @{
data = $Data
}
Hide-UDModal -All
}
}
New-UDParagraph -Content {
New-UDTable -Id 'aTable' -Data $Data -Columns @(
New-UDTableColumn -Property 'CustomerDisplayname' -Title 'Customer Display Name' -ShowFilter -ShowSort -DefaultSortColumn $true
New-UDTableColumn -Property 'RelationshipEndDateTime' -Title 'Relationship End Date Time' -ShowSort -OnRender {
$EventData.RelationshipEndDateTime.ToString('yyyy-MM-dd HH:mm:ss')
}
New-UDTableColumn -Property 'RelationshipAutoExtendDuration' -Title 'Relationship Auto Extend' -OnRender {
if ($EventData.RelationshipAutoExtendDuration -eq 'PT0S') {
New-UDIcon -Icon 'close' -Color 'red'
} else {
New-UDIcon -Icon 'check' -Color 'green'
}
} -ShowFilter -ShowSort -FilterType select
New-UDTableColumn -Property 'RoleAssignmentName' -Title 'Role Assignment' -ShowFilter -ShowSort -Render {
New-UDLink -Text $EventData.RoleAssignmentName -Url "#"
}
New-UDTableColumn -Property 'SecurityGroupName' -Title 'Security Group' -ShowFilter -ShowSort -Render {
New-UDLink -Text $EventData.SecurityGroupName -Url "#"
}
New-UDTableColumn -Property 'Status' -Title 'Status' -ShowFilter -ShowSort -FilterType autocomplete
) -ShowPagination -PageSize 25 -StickyHeader
}
}
}
} -AutoInclude