UniqueValueRenderer with multiple integer fields?

372
2
Jump to solution
04-02-2018 01:20 PM
MollyFoley
Regular Contributor

Is this possible? I can use the UniqueValueRenderer with one integer field, but I can't get it to work with two. The renderer really has about 50 values, but I've only included one below so you get the idea:

var fineRenderer = new UniqueValueRenderer(defaultSymbol, "Overstory", "Understory", null, ":");
    fineRenderer.addValue(11000:11000, new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0,0,0]), 1), new Color([217, 0, 0])));

I cannot figure out what I'm doing wrong. I'm specifying null for the third attribute field and then specifying the delimiter. My FeatureLayer has both "Overstory" and "Understory" fields. I don't know what the deal is. Do I need to put quotes around 11000:11000? I don't know if that'd work because the fields are integers, not strings. Do I need to try putting it in brackets like [11000:11000] or something? I'm at a loss here.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
BalajiVeera
Occasional Contributor

Molly,

Regard less of field datatype, add vales should be put in double quotes. ex: "11000:11000"

And respective values should be member of the unique values of the field

View solution in original post

0 Kudos
2 Replies
BalajiVeera
Occasional Contributor

Molly,

Regard less of field datatype, add vales should be put in double quotes. ex: "11000:11000"

And respective values should be member of the unique values of the field

View solution in original post

0 Kudos
EllaHaines
New Contributor III
var fineRenderer = new UniqueValueRenderer(defaultSymbol, "Overstory", "Understory");
fineRenderer.fieldDelimiter = ":";
0 Kudos