Skip to main content
bebarth
Community Expert
Community Expert
October 5, 2024
Answered

Unselect all items of a list field

  • October 5, 2024
  • 1 reply
  • 632 views

I tryed to unselect via javaScript all items of a list field setting "currentValueIndices" to -1 but it seems that doesn't work.

The setting works fine to indicate the selected item(s) with a number or an array, but doesn't work for unselect all of them, whereas -1 is the value returned if no items are selected...

Is there an other way to do?

Thanks

This topic has been closed for replies.
Correct answer try67

Reset the field:

this.resetForm(["List1"]);

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
October 5, 2024

Reset the field:

this.resetForm(["List1"]);

bebarth
Community Expert
bebarthCommunity ExpertAuthor
Community Expert
October 6, 2024

obviously!
Works fine, thanks.