FieldReadConfiguration class - Android
The FieldReadConfiguration class provides the ability to define what fields to return or not return in a response record.
| Name | Type | Description |
|---|---|---|
| includeFields | Collection<String> | Fields to return in the response. |
| queryItems | Map<String, String> | Read-only. Collection of query items representing the read configuration. |
| queryParams | QueryParams | Iterable structure that contains name-value pairs of request query parameters. Use these parameters to build a request. |
FieldReadConfiguration - FieldReadConfiguration(includeFields: Collection<String> = listOf(), vararg options: FieldReadConfiguration.Options)
Defines the fields to include in the return response from the associated ServiceNow table.
| Name | Type | Description |
|---|---|---|
| includeFields | Collection<String> | List of comma-separated fields to return in the response. If the list is empty, all fields are returned. |
| vararg options | FieldReadConfiguration.Options | Optional. Array of zero or more options that define the type of field
information to return. Possible values:
|
The following code example shows how to call this function.
val readConfiguration = FieldReadConfiguration(
includeFields = listOf("sys_id", "sys_created_on", "short_description"),
options = arrayOf(FieldReadConfiguration.Options.DISPLAY_VALUES)
)
val fetchConfiguration = FetchConfiguration(
filter = Filter("active=true"),
readConfiguration = readConfiguration
)
val response = nowTableService.records("incident", fetchConfiguration).execute()
handleResponse(response)