List.[Table] data type

  • Release version: Yokohama
  • Updated January 30, 2025
  • 2 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 List.[Table] data type

    The List.[Table] data type in ServiceNow stores a list of record Sys IDs associated with a specific table. It supports AI Platform List field options such as default records and reference qualifiers. This data type is designed to help flow and action designers manage lists of records effectively within workflows.

    Show full answer Show less

    Key Features

    • Basic Options:
      • Label: Identifies the data variable in Workflow Studio with any text.
      • Name: Used in script calls; automatically sanitized to alphanumeric and underscore characters.
      • Type: Indicates the data type stored.
      • Mandatory: Specifies if the variable requires a value when configured.
    • Advanced Options for List Variables:
      • Hint: Offers configuration guidance to flow or action designers.
      • Default Value: Value used if none is provided by the designer.
      • Add [Record Label]: Selects one or more records as default values, filtered by reference qualifiers if applied.
      • Reference Qualifier Conditions: Filters the list records shown, limiting selections to those matching specified criteria.

    Practical Guidance for ServiceNow Customers

    • Reference Qualifiers: Use these to filter lists so only relevant records appear, improving accuracy and usability. For example, to show only active incidents, apply a qualifier like [Active][is][true].
    • Avoid Default Records for Store Actions: When creating actions intended for the ServiceNow Store, avoid setting default records unless you are certain all instances can access these records. Spoke developers often lack access to customer data, so defaults should be demo data only.
    • Using List Variables in Flow Logic: Lists are especially useful in For Each flow logic to process multiple records. Note that only valid record Sys IDs are processed; any invalid entries such as email addresses are ignored automatically.

    Key Outcomes

    By leveraging the List.[Table] data type with proper configuration of labels, names, reference qualifiers, and defaults, ServiceNow customers can efficiently manage lists of records within workflows. This enhances flow precision, reduces errors, and supports scalable automation in enterprise environments.

    Stores a list of record Sys IDs associated to a specific table. This variable supports ServiceNow AI Platform List field options such as default records and reference qualifiers.

    Basic options

    Option Description
    Label Displays the label used to identify the data variable in the Workflow Studio interface. The label can consist of any text.
    Name Displays the name used to identify the data variable in script calls. The name can only consist of alphanumeric and underscore characters. The system automatically converts the label into a valid name by removing or replacing any special characters.
    Type Indicates the type of data stored by the data variable.
    Mandatory Indicates whether the data variable must contain a value when configured in an action.

    Advanced options for List variables

    Option Description
    Hint Provides guidance to flow or action designers on how to configure the data.
    Default value Specifies the value used when a flow or action designer does not provide a value.
    Add [Record Label] Select one or more records to include as default values for the list. If you filter the list with a reference qualifier, you can only select records that match the reference qualifier conditions.
    Reference qualifier conditions Select the filter conditions applied to the list of records. Flow designers can only select records that match the reference qualifier conditions.

    General guidelines

    Add a reference qualifier to filter list records
    Filter the records the list variable displays as valid options by adding a reference qualifier. The reference qualifier acts as a required list filter and causes the list variable to display only records that match the reference qualifier conditions. For example, to only displays active incident records add the reference qualifier condition [Active][is][true].
    Avoid selecting default records for actions intended for ServiceNow Store
    Avoid selecting default records for a list unless you know that all instances have access to the selected records. Spoke developers typically do not have access to the data of the customers who install their custom action. If you want to publish a custom action on the ServiceNow Store, you may need to provide default records as demo data.
    Use List variables in For Each flow logic
    You can use a List variable to specify the records to process within For Each flow logic. The For Each flow logic ignores any non-record sys_id present in the data. For example, if the List variable contains an email address, the flow logic ignores it.