New-UDAutocomplete -Multiple allows selecting same item more than once
New-UDAutocomplete components with the -Multiple parameter allow individual options to be selected more than once. I previously opened an issue, with examples to reproduce the bug, here:
https://github.com/ironmansoftware/powershell-universal/issues/5241
That was for version 5.6.7, but the bug still exists in 2026.2.3.
Can this be fixed? Otherwise, is there a workaround?
Hello dg-td,
Thank you for reporting this and for linking the previous reproduction examples.
We will validate this behavior in PowerShell Universal 2026.2.3 using the examples from the existing issue. In particular, we want to confirm whether the duplicate selection is limited to the displayed chips or whether duplicate values are also returned through -OnChange, Get-UDElement, or form submission.
Could you please confirm whether the original examples reproduce without modification in 2026.2.3, and whether your current implementation uses static -Options or dynamic -OnLoadOptions?
At this point, we have not confirmed a supported workaround. Once the current behavior has been reproduced and its effect on the component value has been verified, we can determine whether a safe temporary mitigation is available and whether Development review is required.
Best regards,
Ruben Tapia
Ruben: The original examples work exactly the same in 2026.2.3 as they did in 5.6.7. If you select the same menu options as the ones shown in the screenshot I included, it still looks the same with the new version of PSU.
I am using static -Options, not dynamic -OnLoadOptions.
Here is another example (simplified for this post) that I am using to allow IT staff to select Active Directory groups:
New-UDAutocomplete -Multiple -Options {
(Get-ADGroup -Server $dc -Credential $cred -LDAPFilter '(name=*)' -SearchBase $searchbase -Properties CanonicalName) | Foreach-Object {
New-UDAutocompleteOption -Name $_.CanonicalName -Value $_.Name
}
}
This allows users to choose the same items multiple times, which it should not. Other than that, it works correctly.
Hello dg-td,
Thank you for confirming that the original examples behave the same way in PowerShell Universal 2026.2.3 and for sharing the simplified static -Options example.
We will adjust our lab tests to match this implementation, including the use of New-UDAutocompleteOption with static options. We will also verify whether duplicate selections are limited to the displayed items or are included in the component and form values.
Once the behavior has been independently validated in the lab, we will prepare the appropriate evidence package for internal escalation.
Best regards,
Ruben Tapia
Hello dg-td,
Thank you for your patience.
We were able to reproduce the behavior in PowerShell Universal 2026.2.3 using both static string options and New-UDAutocompleteOption objects.
The same option could be selected multiple times, and the duplicate values were retained not only in the displayed chips but also in OnChange, Get-UDElement, and the New-UDForm submission payload.
We will now prepare the reproduction details and supporting evidence for internal escalation to Development. At this stage, we cannot confirm a fix, release target, or timeline.
As a limited defensive measure, duplicate values can be removed during downstream processing, but this does not prevent duplicate selections in the interface and is not a product-level correction.
Best regards,
Ruben Tapia
Hello dg-td,
Thank you for your patience.
We have completed the internal review and submitted the reproduction details and supporting evidence to Development for further investigation.
The escalation includes the confirmed behavior in PSU 2026.2.3, the minimal reproduction, the duplicate values observed in the UI, OnChange, Get-UDElement, and New-UDForm payload, as well as the control test with distinct values.
At this stage, the case has been escalated, but we do not yet have confirmation of a fix, release target, or timeline. We will update this thread when additional information becomes available.
Best regards,
Ruben Tapia