How to select multiple options in a list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
MRVS field is working in Workspace. Check if you can use it.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
}
});