- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 07:40 AM
I have a related list that I am trying to get working from the *clcl_devices table (from connected workspace app) - to the relationships table (cmdb_rel_ci). - to show parent computers. As a test Ive hardcoded the sysid of the *clcl_devices device into the script and it works. However when I try to use current.sys_id to pull the *clcl_devices table sys id it doesnt work (the log shows no value)
Why would the script not be able to pull current.sys_id?
See the attached image for a screenshot of the query
*The community doesnt like that word so I had to put in an abbreviation.
Can anyone help?
Also my second question would be, in a related list how hard would it be to have the edit functionality in the list so that you can select and scroll from the list itself? The current list is just showing a new button
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 07:50 AM
Use parent.sys_id to get the sys ID of the record on the form. Current in the script represents rather the query for records to be shown in the related list. (Answering shortly from my mobile, if needed, I could provide an example script later).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 08:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 06:57 PM
No worries.
As per new community feature you can mark multiple responses as correct.
I believe I also answered your question and also the other part where you asked Edit button to be show. I shared explanation why it can't be shown
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
02-24-2025 07:50 AM
Use parent.sys_id to get the sys ID of the record on the form. Current in the script represents rather the query for records to be shown in the related list. (Answering shortly from my mobile, if needed, I could provide an example script later).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 08:17 AM
Thanks. That works. parent.sys_id pulls the correct value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 09:00 AM
Did you mark your own response as correct?
Would you mind marking my response as correct as my post helped you?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 09:47 AM
Thanks. That wouldve been a mistake. I clicked accept solution on Dominik's post as that was the first response