Returns a list of the unique values for a specified field.
Syntax
(esri_attributes_uniquevalues flname subtype field)
Arguments
- flname | string | required | An existing feature layer name in the drawing.
- subtype | string | required | An existing subtype feature layer name in the drawing. Use an empty string "" for no subtype.
- field | string | required | An existing field name from the feature layer.
Example usage
Requests the unique values from the SUB_REGION field of the USA_States_GENERALIZED (no subtype) feature layer: (esri_attributes_uniquevalues "USA_States_GENERALIZED" "" "SUB_REGION")
Result example usage
Returns a simple list of unique field values of the specified SUB_REGION field name:
("East North Central" "South Atlantic" "New England" "East South Central" "Middle Atlantic" "Mountain" "West South Central" "West North Central" "Pacific")
Return values
- If successful, Returns a simple list of unique field values of the same type as the specified field type
- If failed, a list is returned with the first value of nil; then an associated list is returned containing the key value Error and an associated error message as a string: (nil ( "Error" . "<message>")).
Failed returned values
A failed return value can occur for any of the following reasons:
- (nil ("Error" . "Missing required
argument."))
One or more of the required arguments was not provided.
- (nil ("Error" . "Feature layer not found."))
The specified feature layer does not exist in the file.
- (nil ("Error" . "No connected web feature layers found."))
The network connection to the web feature layer was lost.