[ad_1]
To set an id of a dropdown you need t o use the SetSelection method which expect and array of the ids of the options to select. So you first need to find the id of the option that you want to select, the dropdown also has a field called OptionItemsToUse that has all the options of the dropdown. So you need to use this array to find the id of the option that you want to use, something like this:
var option id=LoadedForms[0].GetFieldById(3).OptionItemsToUse.find(x=>x.Label=="Option 1").Idthen after having the id of the option you just need to use the set selection as explained. Here is the full code for selecting the option with label “Option 1”
var field=LoadedForms[0].GetFieldById(3);
var fieldId=field.OptionItemsToUse.find(x=>x.Label=="Option 1").Id;
field.SetSelection([fieldId])Regards!
