How to delete all options inside multple choice field

How to delete all options inside multple choice field

fd.field('MultipleChoice').options.clear() Not working

Dear @humera.khan,
Welcome to the community! What do you mean by delete? Clear all selection or really delete all available options?

The following code should work to clear all selection:

fd.field('ChoiceCheckboxes').value = '';

I dont want to clear selection , I want to delete all the options.
example
On load i populate the choice field
fd.field('MCLocation').options.push("Somevalue");

Now on change function of any control , I want to repopulate this by deleting/removing existing options

Hello @humera.khan,

You can clear the options like this:

fd.field('MultipleChoice').options = [];
1 Like