---
sourceDocument: Yokohama ServiceNow AI Platform Capabilities
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/servicenow-platform

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Attachment

# Attachment {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Attachment Variable

The Attachment variable allows users to upload attachments as part of catalog item requests in ServiceNow.
It supports managing attachments by enabling download, update, and deletion actions both during request submission and fulfillment (requested item or catalog task).
Show full answer Show less  

## Key Features

* **File Restrictions:** You can restrict file size and allowed file extensions using the `maxfilesize` and `allowedextensions` variable attributes.
* **Size Limits:** The maximum file size defaults to the `glide.sc.variable.attachment.defaultmaxsize` system property (default 20 MB) unless overridden by `maxfilesize`. However, the global `com.glide.attachment.maxsize` property caps all attachment sizes across the ServiceNow AI Platform.
* **Attachment Lifecycle:** Attachments are saved to the `sysattachment` table when the item request is submitted, added to cart, or saved in fulfillment flows. Editing an attachment replaces the old file, and deleting or updating before submission clears the attachment entry.
* **Attachment Copying:** Attachments are copied in scenarios such as:
  * Order guides cascading variables to catalog items (note that individual variable attributes are not honored initially in the rule base).
  * Record producers mapping the variable to a task table field of File Attachment type.
  After copying, attachments are independent; changes to one do not affect the other.
* **API Support:** The `gform.setValue()` client script API is supported for this variable.
* **Security:** If system-wide anti-virus scanning is enabled, attachments are scanned when submitting requests or adding items to cart or wish list.
* **Compatibility:** This variable is supported in flows, workflows, and condition builder but not in multi-row variable sets or order guide item variable assignment.

## Key Outcomes

* Enable requesters to attach relevant files directly to catalog items, improving information completeness for service fulfillment.
* Control attachment size and file types to maintain system performance and security compliance.
* Maintain attachment integrity and independent management when attachments are cascaded or copied across order guides, catalog items, and record producers.
* Leverage the variable in various ServiceNow automation tools and interfaces while understanding its limitations in multi-row variable sets and order guide assignments.  
When submitting a catalog item request, this variable lets you upload an attachment for a question of the item.  
After you upload the attachment, you can also download, update, and delete it. Even when fulfilling the request, you can download, update, and delete the attachment in a requested item or catalog task. You can specify restrictions for file size and extensions using the max_file_size and allowed_extensions variable attributes. For information on these variable attributes, see [Service Catalog variable attributes](https://www.servicenow.com/docs/08IBEw8FtGunfRviPgdk6Q "There are a few Service Catalog variables support specific attributes to define the behavior and restrictions for variables.").  
Important:  
* You should specify only an integer value for the following:
  * The <kbd class="ph userinput">max_file_size</kbd> variable attribute
  * The glide.sc.variable.attachment.default_max_size system property (catalog-level). The default value is 20.
  {#attachment__ul_qm3_2h5_3mb}
* If the <kbd class="ph userinput">max_file_size</kbd> variable attribute is not specified, the glide.sc.variable.attachment.default_max_size system property value is considered as the upper limit for the attachment file size.
* Irrespective of the file size allowed in the variable, the attachment file size cannot exceed the size specified in com.glide.attachment.max_size system property, which is applicable for attachments across ServiceNow AI Platform.
* The g_form.setValue() API is supported in catalog client scripts.
{#attachment__ul_wvx_1zt_3mb}  
Note:  
When you edit an attachment, the existing attachment is removed and a new attachment is uploaded.

When you upload an attachment to this variable, an entry is created in the Attachment \[sys_attachment\] table. The variable is not updated until you submit the item request, add it to the cart, or save the record while editing it (in
fulfiller flows). If you delete or update the attachment before submitting the corresponding catalog item, the entry in the Attachment \[sys_attachment\] table is cleared.  
The attachment uploaded for this variable is copied in the following scenarios:

* In an order guide, when the variable is cascaded to a catalog item in the rule base  
  Important:  
  The individual variable attributes are not honored for the catalog items in the rule base. For example, let us consider that a variable in the Describe Needs section allows a .pdf attachment and the variable of a catalog item in the rule base allows a .txt attachment. When you upload an attachment of .pdf type for a variable in the Describe Needs section, it is initially cascaded to the variable in the catalog item as well and the variable attributes specified in the catalog item are not honored. However, if you delete this initially cascaded attachment from an individual item and try to upload a new attachment, then the individual variable attributes of the catalog item are honored.
* In a record producer, when the variable is mapped to a task table field. This variable can be mapped only to the File Attachment field type of a task table.

{#attachment__ul_bxv_3wy_dmb}  
Important:  
After an attachment is copied, the changes to the individual attachments are independent. For example, any change to an attachment in the order guide does not impact the same attachment cascaded to the catalog item in the rule base.  
Warning:  
Since the attachments are copied, a larger size can lead to performance issues.  
If the system-wide anti-virus check is enabled, the anti-virus check is performed on the attachment when you:

* Submit a request for the corresponding catalog item
* Add the catalog item to the cart or wish list
{#attachment__ul_vvr_fw4_3mb}  
Note:  
* This variable is not supported in a multi-row variable set.
* This variable is supported in flows and workflows.
* This variable is available in condition builder
* For this variable, item variable assignment is not supported in order guide.
{#attachment__ul_vzg_qvg_bmb}  
Figure 1. Attachment variable
**Related concepts**   

* [Break](https://www.servicenow.com/docs/ZPkcnLIOoUJ0KUAwbkZq1Q "The break variable displays a horizontal line across the form.")
* [Check box](https://www.servicenow.com/docs/dbzfzFBOnL0cGsYHCyY0ew "The check box variable lets you enable and disable options by selecting and clearing it.")
* [Container start, container split, and container end](https://www.servicenow.com/docs/pC3s_06HYIQ2nYqGR3zVTQ "The container start, container split, and container end variables define a layout for a container that can hold more variables.")
* [Date, Date and time, and Duration](https://www.servicenow.com/docs/uzlw6WNmuwB3x01yjFA0pQ "The date variable creates a widget with a field and calendar to select a date.")
* [Email](https://www.servicenow.com/docs/e05Xnwb1dlr3HvDFYMK85w "The email variable creates a widget to enter and select an email address.")
* [HTML](https://www.servicenow.com/docs/vEd~WSLcnLEnCKxB4dWLrw "The HTML variable lets you provide content with advanced formatting, including images, for a catalog item.")
* [IP Address](https://www.servicenow.com/docs/qSWnkVruJD2Cbdub~ODQ2w "Use the IP address variable to specify the IPv4 and IPv6 data for a catalog item.")
* [Label](https://www.servicenow.com/docs/55~SxLwA_bs95JADgcA79w "The label variable displays a label across the form. Labels are formatting elements. No data is collected.")
* [List collector](https://www.servicenow.com/docs/PBw_niFNS0zVn7ZJIcBonQ "The list collector variable creates an interface that lets you select and add multiple records from a table.")
* [Lookup multiple choice](https://www.servicenow.com/docs/10gK7f2avwj7NEyP2~BFlg "The lookup multiple choice variable creates radio buttons using data from a table. Its functionality is similar to the lookup select box variable, which creates a choice list from queried data.")
* [Lookup select box](https://www.servicenow.com/docs/sHCOcg~Iem_zOUhSXLPrvg "The lookup select box variable creates a choice list using data queried from a table. Its functionality is similar to the lookup multiple choice variable, which creates radio buttons from queried data.")
* [Custom and Custom with label](https://www.servicenow.com/docs/7kVwkVNouYvNWsWUJRTR9Q "The custom variable inserts a UI macro into the catalog item. Custom with label variable inserts a UI macro with a label.")
* [Masked](https://www.servicenow.com/docs/hwnWO2P~80q7qhbXika9yg "The masked variable inserts a field that masks the text entered.")
* [Multi-line text](https://www.servicenow.com/docs/fFQDuJAidoKgNq_Z8P1xNQ "The multi-line text variable creates a field that lets you enter multiple lines of text.")
* [Multiple choice](https://www.servicenow.com/docs/IpqZmjpq1v5Rf28NHh645A "The multiple choice variable creates radio buttons for question choices.")
* [Numeric scale](https://www.servicenow.com/docs/2I4UDB_n8iMVzpTMChLB2Q "The numeric scale variable creates a set of radio buttons for a range of options, like a Likert scale.")
* [Reference](https://www.servicenow.com/docs/m7TquCi~aKhtuV~EOj14Qw "A reference variable references a record in another table. For example, a variable named point_of_contact references the User [sys_user] table.")
* [Requested for](https://www.servicenow.com/docs/N2sHQov681zrbqCejbA~Dw "Before submitting a catalog item request, this variable helps you specify who this request can be submitted for.")
* [Rich Text Label](https://www.servicenow.com/docs/vUsX7U3OToPdlSQGu~MxMQ "This variable displays a formatted label on a catalog item form.")
* [Select box](https://www.servicenow.com/docs/mTLXDo1f0knfdn1BrNg~Sg "The select box variable creates a list from predefined question choices.")
* [Single-line text](https://www.servicenow.com/docs/F91A9HDH34PCsK~w5SK_5w "The single-line text variable creates a field to enter a single line of text.")
* [UI page](https://www.servicenow.com/docs/lmwv0niDqrzcCUzj~AL0fA "The UI page variable inserts a UI page into the catalog item.")
* [URL](https://www.servicenow.com/docs/K~Kn8iqfU_N6FMpwJa~sSA "The URL variable creates a widget for users to enter URLs.")
* [Wide single-line text](https://www.servicenow.com/docs/9xTczJ~RQ3vCeGDfA9DYCw "The wide single-line text variable creates a field that spans the form, letting users enter longer lines of text.")
* [Yes/No](https://www.servicenow.com/docs/42KYd19QsroLGxZ5n~M_2Q "The Yes or No variable creates a choice list with Yes and No as options.")  
**Related reference**   

* [Variable support in various channels](https://www.servicenow.com/docs/_FSp~~cB0QAPSeTClzNhmQ "Service Catalog variables are supported in various channels.")

