On a multi select field how do I unselect fields?
# suitescript
m
On a multi select field how do I unselect fields?
b
set the value to null to unselect everything
use setValue or setText with an array of values you want to keep to unselect everything else
basically overwrite the existing value
m
Thanks, what can I do if I want to remove all selected without over righting new ones
b
get the existing value in the multiselect field
then remove the elements you dont want
alternatively create a new array with only the elements you want
then set the multiselect field
m
I understand I can remove elements from the array but how do I remove everything? I set it to an empty array?
b
null is what i normally use
i expect an empty array to work too
m
Ok gonna try. thanks so much!
It works. awsome!
154 Views