- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2023 11:18 AM
What does $sp.getValue("sys_id") return? The sys_id of what?
From what table does $sp.getMenuItems get its data?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2023 11:53 AM
Hello @GLewis5 ,
It return the sys_id from the sp_instance_menu table.
Please find the below link for more info
https://sn.jace.pro/classes/glidespscriptable/
Thank you,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2023 11:53 AM
Hello @GLewis5 ,
It return the sys_id from the sp_instance_menu table.
Please find the below link for more info
https://sn.jace.pro/classes/glidespscriptable/
Thank you,
Omkar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 10:51 AM
I had a similar question but I was needing to know what the structure of the menu looks, but $sp is not available in Xplore script utility. I used the reference above to display what is returned from the $sp.getMenuItems(menu_id):
var sp = new GlideSPScriptable();
var menu_id = '4ebb93d81b79c690a95611f8bc4bcb2d'; // sys_id of the menu sp_instance_menu
var items = sp.getMenuItems(menu_id);
items;
You can capture the sys_id from the menu in the application or you can use this code to view all of your menu instances:
var gr = new GlideRecord('sp_instance_menu');
gr.query();
var menus = [];
while (gr.next()){
var menu = {menu_id: gr.getValue('sys_id'), menu_display: gr.getDisplayValue()};
menus.push(menu)
}
menus;
Hope this is helpful,
Paul