catalog Item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
I have created a Catalog Item in ServiceNow with a Multi-Row Variable Set (MRVS). By default, it provides Add and Remove All buttons.
I would like to add a custom button called “Bulk Add” next to the Remove All button. The purpose of this button is to allow users to add multiple rows at once (for example, via a popup, predefined data, or import).
Could anyone guide me on how to achieve this? Specifically:
- Is it possible to customize the MRVS UI to add a custom button?
- Should this be done using a Catalog Client Script, UI Policy, or by modifying the widget (Service Portal)?
- Are there any best practices or supported approaches for this requirement?
Any documentation or examples would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi Mukesh,
Good question this is a common requirement when working with MRVS, but there are some important platform limitations to be aware of.
1. OOB limitation (important)
Multi-Row Variable Set (MRVS):
- Does not support adding custom buttons (like “Bulk Add”) out of the box
- The Add / Remove All buttons are part of the widget (UI), not configurable via UI Policy or Client Script
So:
You cannot add a button using only Catalog Client Script or UI Policy
2. Recommended approach → Service Portal Widget customization (best option)
If you're using Service Portal, this is the proper way.
MRVS is rendered using a widget (typically:
sc-multi-row-variable-set)
What you can do:
- Clone the widget
- Add a “Bulk Add” button in the HTML
- Handle logic in the client controller
Example idea:
c.bulkAdd = function() {
var data = [
{product_name: 'Laptop', price: '1000'},
{product_name: 'Mouse', price: '50'}
];
data.forEach(function(item) {
c.data.rows.push(item);
});
};
Then bind this to your custom button.
3. Alternative → Use Catalog Client Script (limited workaround)
You can simulate bulk add by:
- Creating a separate variable (like a checkbox or select)
- On change → populate MRVS via
g_form.setValue()
But:
- Not user-friendly
- Hard to manage structured row data
4. Another option → Use modal (GlideModal / spModal)
In widget customization:
- Add “Bulk Add” button
- Open modal (spModal)
- Let user input multiple rows
- Push data into MRVS
This gives best UX (closest to your requirement).
5. Best practices
Use widget customization (supported for Portal)
Keep MRVS structure consistent
Validate data before inserting rows
Avoid DOM manipulation hacks (not upgrade-safe)
6. If using Native UI (not Portal)
This becomes much harder:
- MRVS uses Glide UI (not easily customizable)
- No supported way to inject custom button
In that case, consider:
- Separate UI Action + custom dialog
- Or redesign using related list instead of MRVS
