Service Portal Select Box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2017 07:30 AM
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:
if I untick "include None" then they both disappear
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2017 07:53 AM
Had a look at the Problem record and I am using an addOption via a Client Script, will try the space idea
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2017 07:55 AM
Correct that I am doing it via a UI Policy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2017 07:56 AM
Then ServiceNow KB: Multiple -- None -- options after using g_form.addOption() in Service Portal (KB05986... says it is fixed in Istanbul for g_form.getOption();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2017 08:01 AM
We have Jakarta installed on another instance, will try it out on that to see if its resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2017 03:21 PM
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);
});
}