Combo .setValue() with a String

Hi there. Given a string, I’m trying to assign a combo box to that string value but am having no success. Pseudo-code:

{ view:“combo”, label:“Supplier”, id:“supplier”, name:“supplier”, options:{body:{dynamic:true, url: “./myURL”}},}

$$(“supplier”).setValue(‘Apple’);

The value ‘Apple’ is an existing item within the options of my combo, but using .setValue() with a ‘Apple’ inside does not set the combo to that string; it leaves it blank.

Using an int does work (i.e. if Apple is the 3rd option in my combo drop down and I do
$$(“supplier”).setValue(3) that works), but I would like to be able to pass in and set it to a string instead of calling it’s int position.

Any help would be great, thank you!

@mmarion
try this

$$("supplier").getList().waitData.then(()=>$$("supplier").setValue('Apple'));

https://docs.webix.com/api__link__ui.list_waitdata_other.html