How to select multiple options in a list

ServiceNow Use6
Tera Guru

Hi,

My requirement is to have ability to select multiple options in a List of SIDs affected variable. Currently I am able to select only one value at a time. Kindly help.

 

0.png

 

1.png

 

2.png

 

Regards

Suman P.

 

14 REPLIES 14

Hi @ServiceNow Use6 

MRVS field is working in Workspace. Check if you can use it. 

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Hi @Tanushree Maiti,

MRVS works only in Catalogs.

Regards

Suman P.

Hi @ServiceNow Use6 /Suman

 

If I take List type field , I am able select multi options. tried in SOW. 

Please try once.

Check testList field in sample screen shot.

TanushreeMaiti_0-1779128115332.png

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Hi @Tanushree Maiti,

I am able to select multiple options, i will say exactly what i mean here.

In the pop up i am able to select one after the other, if i have to select 10 of them of the list in the screen here, i have to click on magnifying class 10 times and select one after the other what they want is instead there can be checkbox or something for them to be able to select at once.

1.png

 

Regards

Suman P.

ServiceNow Use6
Tera Guru

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || !newValue) {
return;
}

var ga = new GlideAjax('GetSIDsBySite');
ga.addParam('sysparm_name', 'getSIDs');
ga.addParam('sysparm_site', newValue);

ga.getXMLAnswer(function(response) {
if (response) {
g_form.setValue('u_list_of_customers_affected', response);
} else {
g_form.clearValue('u_list_of_customers_affected');
}
});
}

var GetSIDsBySite = Class.create();
GetSIDsBySite.prototype = Object.extendsObject(AbstractAjaxProcessor, {

getSIDs: function() {
var site = this.getParameter('sysparm_site');
var sidList = [];

var gr = new GlideRecord('sn_install_base_sold_product');
gr.addQuery('u_location', 'IN', site);
gr.query();

while (gr.next()) {
sidList.push(gr.getUniqueValue());
}

return sidList.join(','); // 🔥 THIS IS MANDATORY
}

});