
- 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-22-2025 08:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 09:07 PM
Glad to help.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader