Service Portal Select Box

Ashley
Kilo Sage

Not sure if anyone else has seen this problem in the new Service Portal but I have a Select Box with some choices on, I have None included to be the Default option selected when it loads but 2 Nones are displayed:

find_real_file.png

if I untick "include None" then they both disappear

find_real_file.png

find_real_file.png

If I view it in the Service Catalog, it displays correctly with only one None displaying as expected... at a loss

Just to add I don't have any empty choices in the Select box.

9 REPLIES 9

Had a look at the Problem record and I am using an addOption via a Client Script, will try the space idea


Correct that I am doing it via a UI Policy


We have Jakarta installed on another instance, will try it out on that to see if its resolved.


vrfox
Giga Contributor

Create a catalog client script to clean the options


function onLoad() {


var field = g_form.getField('field');



var newChoices = [];


for(var x = 0; x < field.choices.length; x++){


var choice = field.choices[x];



if(choice.label == "-- None --"){


//omit this choice


}else{


newChoices.push(choice);


}


}



g_form.clearOptions('field');



newChoices.forEach(function(f){


g_form.addOption('field', f.value, f.label);


});


}