How can i restrict file type in the attachment for the specific catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2025 12:02 AM
Hi All,
I have requirement to restrict .exe and msi file types in the attachment variable for specific catalog item. Can someone help me on this to how to restrict on this.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2025 12:24 AM
Hi,
If you use an attachment variable, you can use the allowed_extensions attribute to control allowed file types within that field.
https://www.servicenow.com/docs/csh?topicname=attachment.html&version=latest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2025 12:28 AM - edited 02-28-2025 12:49 AM
Hi @Anupriya_11 ,
Open the dictionary entry for the attachment variable.
If Variable attributes field is not on the form, edit form view and add it.
mention allowed_extensions=txt;pdf. which all file types you want to allow. and save the changes.
If this answers your query please mark it as helpful/correct
Best Regards,
Pooja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2025 01:03 AM
you can use approach shared by @Kieran Anson
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