
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 10:08 PM
I'd like to have a catalog item that displays the currently assigned assets for a user in a multi row variable set.
I feel this is the best way to display all assets on a catalog item since different users will have differing numbers of assets assigned to them.
Anyone know how I'd go about this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 08:21 PM
Here you go without Script Include
1) create catalog client script which applies on Catalog Item
2) UI Type- ALL
3) Script as this
function onLoad() {
var gr = new GlideRecord("alm_asset");
gr.addQuery("assigned_to", g_user.userID);
gr.query(checkRecord);
function checkRecord(gr) {
var arr = [];
while (gr.next()) {
var obj = {};
obj['mrvs_asset_number'] = gr.sys_id.toString();
obj['mrvs_asset_description'] = gr.display_name.toString(); // stores the asset display name
// if you wish to populate the model name then you will have to use split on the display name and store
arr.push(obj);
}
g_form.setValue('mrvs_assigned_assets', JSON.stringify(arr));
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 10:11 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 10:16 PM
Thank you, that is not quite what I'm looking for. That is populating details based on a selection, I want to auto populate assets on load of the catalog item for assets assigned to the current user. There should be nothing the user needs to select in order to populate if possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 11:11 PM
script shared in my below post should help you do that
Do let me know if any help required
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2025 10:14 PM
so that MRVS should show asset information for assets belonging to logged in user or some other user which can be selected from some other variable?
you can set value in MRVS variable which is an array of json object
I shared solution for something similar in past, enhance for your requirement
How to auto populate project details in a multi row variable set
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader