Select to view content in your preferred language

Generate Renderer throws "Error generating uniqeValues." error

1615
3
Jump to solution
05-24-2013 12:32 AM
SteveMcMaster
Emerging Contributor
Hi,

I'm playing with the unique renderer generator function in the JS API, but appear to have hit a issue with my rest service.

I've created a map service which consists of a point feature class that is joined to a non-spatial "work table", with the rule set to only keep matching values.

When I attempt to call the "Generate Renderer" function on the feature class in question (loaded through arcgis/rest/services/... ), I receive the error (spelling mistake included):

Error generating uniqeValues.


The server log contains the following text:

<Msg time='2013-05-24T16:19:20,443' type='SEVERE' code='10819' target='xxx/xxxSearch.MapServer' methodName='MapServer.REST.GenerateRenderer' machine='SV-BASHFUL.xxx.LOCAL' process='5984' thread='4744' user='null' >Missing parameter: Error generating unique values</Msg>


If I remove the join and publish the service, using the same parameters, I do not receive the error and get the expected results.

Am I missing some parameter, or is there a limitation on using the renderer with map services that contain joins?

For reference, the parameter I am providing to the classification definition is:

{"type":"uniqueValueDef","uniqueValueFields":["UNIQUE_FIELD"],"fieldDelimiter": ",","baseSymbol":{"type": "esriSFS","style": "esriSLSSolid","width":2},"colorRamp":{"type":"algorithmic","fromColor":[115,76,0,255],"toColor":[255,25,86,255],"algorithm": "esriHSVAlgorithm"}}


Thanks.

Steve
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
TanuHoque
Esri Regular Contributor
Steve,
when a layer is joined, the field named used in any operation must be fully qualified (e.g. layerName.FieldName or DBname.username.layername.fieldname).

pass in the field name exactly the way it is showed up in the layer's resource page.

View solution in original post

0 Kudos
3 Replies
TanuHoque
Esri Regular Contributor
Steve,
when a layer is joined, the field named used in any operation must be fully qualified (e.g. layerName.FieldName or DBname.username.layername.fieldname).

pass in the field name exactly the way it is showed up in the layer's resource page.
0 Kudos
SrinivasVinnakota
Esri Contributor
Did you input fully qualified field name for the "UNIQUE_FIELD". I replaced your input with a fully qualified name and it works fine for me.
{"type":"uniqueValueDef","uniqueValueFields":["sde.SDE.states.SUB_REGION"],"fieldDelimiter": ",","baseSymbol":{"type": "esriSFS","style": "esriSLSSolid","width":2},"colorRamp":{"type":"algorithmic","fromColor":[115,76,0,255],"toColor":[255,25,86,255],"algorithm": "esriHSVAlgorithm"}}
0 Kudos
SteveMcMaster
Emerging Contributor
Thanks guys - adding in the schema and table name to the query returns the expected results.

Steve
0 Kudos