FetchConfiguration class - Android

  • Release version: Zurich
  • Updated July 31, 2025
  • 1 minute to read
  • The FetchConfiguration class provides the ability to define the configuration for fetching records from the associatedServiceNow table.

    This class only contains a single function (constructor), FetchConfiguration().

    Table 1. Properties
    Name Type Description
    filter Filter Query to use to filter the return results.
    limit Integer Number of records per page/response to return.
    queryParams QueryParams Iterable structure that contains name-value pairs of request query parameters.
    readConfiguration FieldReadConfiguration Configuration for the fields to return in the response.

    FetchConfiguration - FetchConfiguration(filter: Filter? = null, limit: Int? = null, readConfiguration: FieldReadConfiguration? = null)

    Enables you to define the records and fields to return from the associated ServiceNow table.

    Table 2. Parameters
    Name Type Description
    filter Filter Optional. Query to use to filter the records that are returned from the table. For example: active=true^short_descriptionLIKEbroken

    Default: null - Return all records.

    limit Integer Optional. Number of records to return per page/response.

    Default: null - Return the maximum allowed by the ServiceNow REST API.

    readConfiguration FieldReadConfiguration Optional. Configuration of the fields returned in the response.

    Default: null - Return all fields.

    The following code example shows how to call this function.

    nowTableService.records("incident", FetchConfiguration( 
      filter = Filter("active=true"), 
      limit = 10, 
      readConfiguration = FieldReadConfiguration( 
        includeFields = listOf("sys_id", "short_description") 
      ) 
    ))