Programmatically changing the selected value of a selectExt

Hello, I have a selectExt view control defined like this:

scheduler.config.form.unshift({ view:"layout", type:"clean", batch:"client", cols:[ { view:"selectExt", id:"service_id", name:"service_id", options:[ ... ] }

I want to be able to reset the selected value to the default every time the scheduler form loads, but passing a value in the return of scheduler.templates.new_event_data doesn’t seem to work. (I assume that only works for regular select controls, not selectExt?)

So I am trying to figure out how to set the value programmatically in the new_event_data template. I’ve tried the following:

$$('scheduler').$$('service_id').setValue($$('scheduler').$$('service_id').data.options[0].value);

… as well as other variants of of using setValue like using a hard-coded value, but nothing seems to work. Very simply, I just need to have that selectExt reset when new_event_data is executed.

Thanks for your help,
Chris

in the return of scheduler.templates.new_event_data doesn’t seem to work. (I assume that only works for regular select controls, not selectExt?)

Actually must work for all kind of inputs, you are setting obj.service_id and option with such value is exists in the select control, right ?

API command must also work correctly, but if you are loading options dynamically - be sure that they are already loaded on moment of the command call.