Prefilling variable values on the catalog item form in the portal and Next Experience UIs

  • Release version: Australia
  • Updated March 12, 2026
  • 3 minutes to read
  • Summarize
    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 Prefilling Variable Values on the Catalog Item Form in the Portal and Next Experience UIs

    This feature allows catalog item requesters to have forms prefilled with key-value pairs in ServiceNow portals and Next Experience UIs. By pre-filling form variables, users can complete their requests more efficiently, while all dynamic behaviors remain intact, as these values are treated as user-inputted values. This functionality is enabled by default but can be turned off by modifying the glide.sc.enableurlprefill property.

    Show full answer Show less

    Key Features

    • Prefilling Forms on Portals: Modify the URL using the sysparmvariablevalues parameter to set key-value pairs for catalog items. For example, the URL can be constructed to prefill fields like Department and Business justification.
    • Prefilling Forms on Next Experience UIs: Key-value pairs are passed directly to the component as input properties, allowing for seamless pre-filling of forms when items are selected.
    • Inline Catalog Item Forms in Virtual Agent: Prefill values can also be set for inline catalog items used in Virtual Agent by configuring the variableValues property with key-value pairs in a JSON format.

    Key Outcomes

    Implementing prefilled forms enhances user experience by reducing time spent on filling out forms. Users can expect forms to automatically populate with relevant values, streamlining the catalog request process. However, certain variable types, such as attachments and non-input variables, are not supported for pre-filling. Proper configuration ensures that the order of prefilled values corresponds to their arrangement on the catalog item form.

    When catalog item requesters want to order items on portals or Next Experience UI, you can set the catalog items to use the key-value pairs, which prefill the variable values. The requesters can finish forms faster.

    The values set by this method are applied as if they were user-given values. That means dynamic behaviors (Catalog UI policies, catalog client scripts, and so on) work for these values.

    This feature is enabled by default. To turn off this feature, you can set the glide.sc.enable_url_prefill property to false.

    Prefilling forms on portals

    You can configure catalog items in portals like Service Portal or Employee Center to prefill forms by modifying the URL.
    Note:
    In portals, you can find widget instance option called Disable URL prefill. This check box is turned off by default. Select this option to disable URL prefill on that specific portal.
    To configure prefill, you can do the following actions:
    1. Use a URL parameter, sysparm_variable_values, to construct the key-value pairs. In the key-value pair, key is the name of the variable and value is the value of that variable.
      Note:
      The value for a reference variable must be a sys_id.
    2. Provide the value as a URL parameter of sysparm_variable_values. For example, if you want to set Department as “Sales” and Business justification as “employee onboarding”, then use the following URL.

      /sp?id=sc_cat_item&sys_id=e56a7ffe41011300964ff05369414ebd&sysparm_variable_values={"business_justification":"employee onboarding", "department":"221db0edc611228401760aec06c9d929"}

    3. To test the URL, you can add the URL in the browser’s address bar and open it.

      You can observe that the Department field is prefilled with the value “Sales” and the Business Justification field is prefilled with the value as “employee onboarding” on load.

      The following variables aren’t supported for prefill:
      • Attachment
      • Custom
      • Custom with label
      • Non-input taking variable types such as label, container
      • Masked
      • UI page
      • Multi-row variable set (MRVS)

      The order in which these variable values are prefilled is the order in which the variables are defined on the catalog item form.

    Prefilling forms on Next Experience UIs

    Configure key-value pairs to prefill catalog item request forms on Next Experience UIs. For the Next Experience UIs, the key-value pairs are sent directly to the component as an input property.

    When the catalog item or form is rendered after the user selects the item, these key-value pairs are passed to the component as an object. The component then parses the object and prefills the form accordingly.

    To configure the key-value pairs, perform these steps:
    1. Navigate to All > Now Experience Framework > Experiences.
    2. Select the UX application for which you want to set prefill values.
    3. Select Open in UI Builder.
    4. Open the page with the catalog item that you want to set the prefill values for.
    5. On the catalog item macroponent, use the variableValues property.
    6. Edit the property to add a key-value pair as shown in the following image.key-value pair example
    7. After providing the key-value pair, save the item and select Preview > Open URL path.

    Prefilling forms for inline catalog items in Virtual Agent

    You can set prefill values for the inline catalog item form used in Virtual Agent.

    To configure prefilling forms for inline catalog items, perform these steps:
    1. Open the topic, for example, Request Catalog Item Inline-seismic.
    2. In the variableValues property, provide the key-value pairs as a stringed JSON object.

    There are two ways of configuring this feature. You can provide a stringed JSON object or you can write a script.

    In this example, as shown in the image, there are two variables, Department and Business justification. Set the value to true for both the variables. You can specify "Department" as “Sales” and "Business justification" as “employee onboarding”.Example of prefilling forms for inline catalog items in Virtual Agent

    Once you configure this, when requesters request items, they would see the forms prefilled.