How to handle multiple uploads inside a single Catalog Item variable in Service Portal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
The Attachment catalog variable is technically bound to one sys_attachment record per variable.
In Service Portal, the widget behind this variable enforces single-file behavior, so each new upload replaces the previous file by design.
This is not a bug, it is a platform limitation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
Hi @NikhithaNikki ,
What you're experiencing is the expected out-of-the-box behavior of the platform.
The Attachment variable type is designed to hold only a single file. When a user uploads another file to the same Attachment variable, the new file replaces the existing one. There is no out-of-the-box configuration that allows a single Attachment variable to store multiple files.
If you need users to upload multiple files conditionally, consider one of the following approaches:
Option 1: Multiple Attachment Variables
If there is a known maximum number of files (for example, up to 3), create multiple Attachment variables (Attachment 1, Attachment 2, Attachment 3) and use Catalog UI Policies to show or make them mandatory based on the user's selections.
Option 2: Use Native Attachments
If the number of files is dynamic or unknown, use the platform's native attachment functionality (paperclip) instead of an Attachment variable. You can then validate the attachment count during submission using an onSubmit Catalog Client Script combined with a GlideAjax call to a Script Include that checks the corresponding sys_attachment records.
This approach provides greater flexibility when users may need to upload multiple supporting documents.
Hope this helps clarify the platform limitation!
Please mark this answer as Helpful if it resolves your question. 🙂
Thanks,
Yogesh Bhatt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
1.If you want to attach multiple attachments then you have to create an attachment macro variable.
Solved: how to upload multiple files with the attachment v... - ServiceNow Community
2.follow method B,The original script in the article uses the Not Equal To (!=) operator. This creates a very strict condition that only allows submission if the user attaches the exact number specified—nothing more, nothing less.changing it to Less Than (<)
Making Attachment Mandatory for a catalog item dep... - ServiceNow Community
3.https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0743672
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
9 hours ago
Recent days, we got the same kind of requirement and faced this issue.
Attachment variable will allow single attachment and replace by latest one. It is OOB behaviour.
Convey business if additional attachment needs to upload, click on paper clip icon on grey header of catalog form.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti