Ive got a simple form that have New-UDSelect with two domains to choose and New-UDAutocomplete where you can browse users depending on domain.
And the simple question is how to clear previously selected user account when I change domain
Simple code
actually clears this filed but I have to click on it to remove value
So basically i cant “refresh” UDAutocomplete value - how to do that ?
PS. Strange issue is, when I wrap it in New-UDElement and sync, whole UDAutocomplete form disappears
PS2 . although i can clear display value by click on it $Eventdata on validate still have old value so its no good fix
Does the job perfectly. Validate is working (there is warning). value of form is cleared.
But there is one nuance. It works only 1 time.
I have domain1 as default option - i choose account.
I change domain to domain2 - udautocomplete is cleared. validate working (warning)
I chose some account from domain2.
I change domain to domain1. account is still chosen. validate is not working (no warning)
PS. looks like we have a working solution
i had to wrap this udautocomplete in New-UDDynamic
then i call