Query Lookup Table

URL:
https://<network-layer-url>/queryLookupTable
Methods:
GET
Required Capability:
The ArcGIS Location Referencing license is required to use this resource.
Version Introduced:
10.7.1

Description

This operation retrieves a list of matching key/value pairs from the lookup table based on a prefix entered by the user and the values in the lookup table configured for use by the network.

Networks that utilize a multifield route ID may optionally specify a lookup table to be used as one of the route ID fields. The lookup table includes a set of key/value pairs. The user interface for defining a multifield route ID will typically present a list of values from the lookup table. When the user selects one of the values for use in the route ID field, the corresponding key will be retrieved and used in constructing the route ID.

For example, if you search the lookup table using the prefix abc and it contains the values abc, abcd, and abcde, the key and value pairs for all those values will be returned. Values such as ab and bc will not be returned.

Request parameters

ParameterDetails

f

(Optional)

Specifies the response format. The default response format is html.

Values: html | json | pjson

fieldName

(Required)

The name of the field in the multifield route ID that will use the lookup table. The stored value in the multifield route ID field will be from the key column in the lookup table.

prefix

(Optional)

Provides the first few characters used for potential matches based on the lookup table values. The search is case insensitive. If prefix is not specified, all of the entries in the lookup table are returned by default.

Syntax:

Use dark colors for code blocksCopy
1
"prefix": "<value prefix>"

Example:

Use dark colors for code blocksCopy
1
"prefix": "abc"

Example usage

The following examples demonstrate how to query the lookup table for key/value pairs.

Example 1

The URL for querying the lookup table for all key/value pairs for the RouteSystem multifield route ID column.

Use dark colors for code blocksCopy
1
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/queryLookupTable?f=json&fieldName="RouteSystem"

Example 2

The URL for querying the lookup table for key/value pairs for the County multifield route ID column where the values begin with "Wash."

Use dark colors for code blocksCopy
1
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/queryLookupTable?f=json&fieldName="County"&prefix="Wash"

JSON response syntax

The following syntax shows parallel arrays of keys and values:

Use dark colors for code blocksCopy
1
2
3
4
{
  "keys": [ "key1","key2","key3","key4", ...  ]
  "values": [ "value1","value2","value3","value4", ...  ]
}

JSON response example

Use dark colors for code blocksCopy
1
2
3
4
{
  "keys": [ "1","2","3","4", …  ]
  "values": [ "I-25","I-225","I-70","I-76", ...  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.