Skip to main content

Hi All,

when i am trying to display drop down values via client script getting empty values in the dropdown column .I have added the script in events after data load. Even  tried with only “setControlOptions('task_steps', 'user_def10', ‘PASS’)” but still same no value displayed in the screen.

Kindly suggest the way to populate the dropdown values via CS and correct me if i did any thing wrong in below code.

 

var emptyOptions = ];
var options = createCodeTableOption('','');
arrayPush(emptyOptions, options);
setControlOptions('task_steps', 'user_def10', emptyOptions);
    var opt1 = ]; 
     
    arrayPush(opt1, createCodeTableOption('PASS','Pass'));
    arrayPush(opt1, createCodeTableOption('FAIL','Fail'));
    arrayPush(opt1, createCodeTableOption('NA','N/A'));
 
    setControlOptions('task_steps', 'user_def10', opt1);     

 

Thanks,

Durga

Hi @Durga 

Looks like a few redundant steps. Try the following

var opt1 =  ]; 

arrayPush(opt1, createCodeTableOption('PASS','Pass'));
arrayPush(opt1, createCodeTableOption('FAIL','Fail'));
arrayPush(opt1, createCodeTableOption('NA','N/A'));

setControlOptions('task_steps', 'user_def10', opt1);
return;

Cheers!


HI @Shneor Cheshin 

 

I have  followed same steps but still same not able to see the values in the dropdown .

 

 

Thanks,

Durga


 @Durga 

I was not aware this is a list control you are trying to populate.

What I can recommend is:

  1. Use a lookup control instead of a dropdown
  2. Try using the ‘Row’ functions such as ‘setRowControlValue()’

While I am confident that a lookup will work, the second option needs to be further investigated and checked if feasible.

Cheers!


Reply