- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2025 03:29 AM
While submitting a catalog item, I'm working on restricting the attachment type. If the attachment type is not .xlsx, we shouldn't be able to submit the request. I created a script include to get the attachment filename. But it's not working. The reason behind is sys_id of the attachment doesn't match.
The attachment is stored in Sys Attachment table. But I'm not sure of the Table Sys Id. It's not the catalog item sys_id.
Can someone please help me to get the Table sys Id? So, I can use this 'Table sys_id' to get the Attachment record using Glide Record.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2025 05:13 AM
you will have to use DOM manipulation etc to get the file names which I won't recommend.
I believe I have answered your question.
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
‎03-20-2025 04:02 AM
Hello @Subashree KR
The "table sys id" is the sys id of the record in which attachment is stored.
For eg. If it's stored in request item table record then it will be record's sys_id exactly and not catalog item.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2025 04:38 AM
Hello @Shivalika,
I'm trying to get the 'Table sys id' of the attachment I uploaded in the portal before submitting the request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2025 04:42 AM
Hello @Subashree KR
It's not that complicated actually. Since you are submitting the request, you should already be having a flow designer or something at place.
In there request_item -> sys id - this sould be enough. Otherwise, you can dotwalk to request_item.sys_id if you are using workflow.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOw
NeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2025 04:44 AM
Why not use Attachment variable and only allow xlsx file?
You can achieve this requirement by populating variable attribute of attachment variable type as "allowed_extensions=xlsx".
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