I want to set the drop down field values through js. I am using following c

I want to set the drop down field values through js.
I am using following code.

importScript('/plugins/servlet/FormsExt.js');
var namespace = window.FormDesigner.runtimeNamespace;
                    if(namespace == null){
                    namespace = "JSON_TASK_NS";
                    window.FormDesigner.runtimeNamespace = "JSON_TASK_NS";
                    }


var a=new Array();
var b=new Array();
a.push("1");
a.push("2");
a.push("3");

b.push("One");
b.push("Two");
b.push("Three");



debugger;
window.FormAPI.updateDropdownValues("dropdown2",a,b);

This code snippet works fine.Giving display values as {"One","Two","Three"} and values to be stored as {1,2,3}.
I have to assign a default value to this drop down.
I used

window.FormAPI.setValue("dropdown2","Two");                    

but it is not working.Can anyone please suggest some way out here to assign a default value to this drop down field....

OriginalPostID-133628

OriginalPostID-133628

  Discussion posts and replies are publicly visible