---
sourceDocument: Australia API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/api-reference

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Configure return results data

# Configure return results data {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 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 Configure Return Results Data

The Mobile SDK allows you to configure data returned from ServiceNow REST endpoints using the FetchConfiguration structure.
This setup lets you specify which records and fields to return, as well as the number of records retrieved.
Consistency in using the same FetchConfiguration across CRUD operations for a model type is crucial to prevent JSON decoding failures.
Show full answer Show less  

## Key Features

* **Filtering Records:** Utilize the Filter structure within FetchConfiguration to filter and sort records. Filters can be initialized in various ways:
  * **Encoded Query:** Use an encoded query string for filtering, such as retrieving active records with specific descriptions.
  * **Filter by Criteria:** Create filters using OR conditions for complex queries, e.g., identifying active incidents assigned to specific users or those needing reassignment.
  * **Keywords and Conditions:** Filter records based on keywords and multiple conditions that are AND'd together.
  * **Conditions:** Apply filters that meet all specified conditions (AND'd), such as active records with specific SLA due dates.
* **Field Configuration:** Use the FieldReadConfiguration to determine which fields to return in results, allowing options for display values, actual values, or exclusion of reference links. This can enhance network efficiency by reducing data transfer.

## Key Outcomes

By effectively configuring return results data, ServiceNow customers can streamline data retrieval processes, ensure relevant information is delivered, and improve the performance of their applications. Proper filtering and field configuration enable targeted data access, enhancing overall user experience and operational efficiency.  
Within the Mobile SDK, when interacting with data from a ServiceNow instance through a REST endpoint, you can configure what data is
passed back in the return results.
You configure what data to pass back using the [FetchConfiguration](https://servicenow-prod.fluidtopics.net/~qxWd2~i3ATVqFbyjbmUfw#FetchConfigiOSStructure "The FetchConfiguration structure provides the ability to define the configuration for fetching records from your ServiceNow instance.") structure. This structure enables you to configure:

* The specific records to return from a table.
* The specific fields to return from the records.
* The number of records to return.
{#mobsdk-ios-config_results_returned__ul_f5t_p2c_3qb}  
Note:  
Generally you want to use the same FetchConfiguration for all of your CRUD operations for a certain model type as it determines which fields are returned. It should at least match the required properties on your model, or else JSON Decoding will fail.

## Configuring the specific records to return {#mobsdk-ios-config_results_returned__specific_records}

The [Filter](https://servicenow-prod.fluidtopics.net/q4Np6yHM7IHZAyPYPtmzcw#FilteriOSStructure "The Filter structure provides the ability to configure filters that define the data to return in the return results of a REST endpoint query.") structure within a FetchConfiguration call enables you to filter and sort the records that are fetched from a ServiceNow instance and passed back in the return results from a REST endpoint. This filter is passed in the sysparm_query parameter of the REST API endpoint. For additional information,
see [Table API](https://servicenow-prod.fluidtopics.net/p9XdJ6vCPwR04mC4QLJjGQ#c_TableAPI "The Table API provides endpoints that allow you to perform create, read, update, and delete (CRUD) operations on existing tables.").  
You can initialize the Filter structure in four different ways depending on the desired filtering capabilities:

1. Filter by [encoded query](https://www.servicenow.com/docs/access?context=c_EncodedQueryStrings&version=australia&pubname=australia-platform-user-interface&ft:locale=en-US)[encoded query](https://www.servicenow.com/docs/access?context=c_EncodedQueryStrings&version=australia&pubname=australia-platform-user-interface&ft:locale=en-US). This type of filter enables you to pass an encoded query that is applied to the records within the specified table.  
   For example, the following call only returns those records that are active and whose short description field contains the word "broken":

       Filter(query: "active=true^short_descriptionLIKEbroken"

   To
   use this type of filtering, initialize the Filter structure using
   the [Filter - init(query: String, queryCategory: String? = nil)](https://servicenow-prod.fluidtopics.net/q4Np6yHM7IHZAyPYPtmzcw#filter-init_S_S "Creates a filter using a specified encoded query.") function.
2. Filter by criteria. This filter enables you to filter based on one or more filter criteria that are OR'd together.  
   For example, a manager has an employee Abel Tuter who is on PTO. They want to know if there are active incidents that are not assigned to anyone or assigned to Abel Tuter so they can assign/reassign them. They also want to see in that same list, all of the incidents that have high or overdue escalation so that they can also address those. The following shows how to create the necessary filters to obtain this data:

       let activeIncidents = Condition.boolean(field: "active", .is(true))

       let assignedToEmpty = Condition.string(field: "assigned_to", .isEmpty) 

       let assignedToAbel = Condition.string(field: "assigned_to", .is("Abel Tuter")) 

       let assignedToAbelOrEmpty = CompoundCondition.or([assignedToEmpty, assignedToAbel]) 

       let needToReassign = Criteria(conditions: [activeIncidents, assignedToAbelOrEmpty])

       let highEscelations = Condition.string(field: "escalation", .is("2"))

       let overdueEscelations = Condition.string(field: "escalation", .is("3"))

       let highORoverdueEscelations = CompoundCondition.or([highEscelations, overdueEscelations]) 

       let needToHandleEscalation = Criteria(condition: highOrOverdueEscelations) 

       let myPrioritiesForTodayFilter = Filter(criteria: [needToReassign, needToHandleEscalation])

   To use this type of filtering, initialize the
   Filter structure using the [Filter - init(criteria criteriaList: \[Criteria\], sortBy: \[Sort\]? = nil, queryCategory: String? = nil)](q4Np6yHM7IHZAyPYPtmzcw#filter-init_A_A_S "Creates a filter based on one or more filter criteria that are OR'd together.") function.
3. Filter by keywords and conditions. This filter enables you to filter records based on specific keywords and conditions that are AND'd together.For example, the following
   filters for all records that contain the keyword "iOS13 or iOS 14" and meet the
   specified condition sorted by testField.

       testKeywordsAndConditionsAndSort() {
         let keywords = "iOS 13 | iOS 14"
         let conditionA = Condition.boolean(field: testField, .is(true))
         let conditionB = Condition.boolean(field: testField2, .is(false))
         let sortA = Sort.asc(testField)
         let filter = Filter(keywords: keywords, conditions: [conditionA, conditionB], sortBy: [sortA])
         
         XCTAssertEqual(filter.query, "123TEXTQUERY321=\(keywords)^\(conditionA.query)^\(conditionB.query)^EQ^\(sortA.query)")
       }

   To use this type of filtering, initialize the
   Filter structure using the [Filter - init(keywords: String? = nil, conditions: \[Condition\], sortBy: \[Sort\]? = nil)](q4Np6yHM7IHZAyPYPtmzcw#filter-init_S_S_S "Creates a filter based on specific keywords and conditions that are AND'd together.") function.
4. Filter by conditions. This filter enables you to filter records that meet all specified conditions (AND'd together).For example, the following filters for all
   records in which the Active field is "true" and the date value of the SLA due field is
   on "today" or any date after today.

       // Where the record is active
       let condition1 = Condition.boolean(field: "active", .is(true))

       // AND the date value of the SLA due field is on "today" or any date after today.
       let condition2 = Condition.dateTime(field: "sla_due", .atOrAfter(0, .daysAgoStart))

       let filter = Filter(conditions: [condition1, condition2])

   To use this type of filtering, initialize the Filter structure
   using the [Filter - init(conditions: \[QueryProviding\], sorts: \[Sort\]? = nil)](q4Np6yHM7IHZAyPYPtmzcw#filter-init_A_S "Creates a filter based on all specified conditions (AND'd together)") function.
{#mobsdk-ios-config_results_returned__ul_agc_qgc_3qb}

## Configuring the specific fields to return {#mobsdk-ios-config_results_returned__section_ldz_cth_3qb}

The [FieldReadConfiguration structure - iOS](https://servicenow-prod.fluidtopics.net/SomHetg5jod1QT_0IqF54w#FieldReadConfigurationiOSStruct "The FieldReadConfiguration structure enables you to configure which fields to fetch from a ServiceNow instance table and in which format.") within the FetchConfiguration method call allows you to configure what fields to pass back in the return results. In addition, you can configure the format/content of the returned fields as:

* display values
* actual values
* exclude reference links
{#mobsdk-ios-config_results_returned__ul_ybh_ng3_3qb}  
Note:  
Configuring the fields to match a Codable model may reduce the payload returned by the ServiceNow instance, improving network efficiency by reducing data transfer.

