Hi - I am using two attribute fields to create a UniqueValueRenderer for my feature layer. I am having trouble with specifying matches if a field has no value but is null. In the example below the first 'infos' object has two values to match the attribute fields being used, but the second info object I am trying match null fields of attribute field 1 and a value of attribute field 2. The second object (null one) is not working and the graphics revert to the default symbol. Any suggestions? I also tried leaving it blank (',Prospect').
var params = { "type" : "uniqueValue", "field1" : "sStatus", "field2" : "iStatus", "fieldDelimiter" : ", ", "defaultLabel" : "Unknown", "defaultSymbol" : { "color" : this.colors.noColor, "type" : "esriSFS", "style" : "esriSFSSolid", "outline" : { "color" : this.colors.opaqueGoldJSON, "type" : "esriSLS", "style" : "esriSLSSolid" } }, "uniqueValueInfos" : [{ "value" : 'In Service, Not Applicable', "label" : "In Service", "symbol" : { "color" : this.colors.lightBlueJSON, "type" : "esriSFS", "style" : "esriSFSSolid", "outline" : { "color" : this.colors.opaqueGoldJSON, "type" : "esriSLS", "style" : "esriSLSSolid" } } }, { "value" : 'null, Prospect', "label" : "Prospect", "symbol" : { "color" : this.colors.goldJSON, "type" : "esriSFS", "style" : "esriSFSSolid", "outline" : { "color" : this.colors.opaqueGoldJSON, "type" : "esriSLS", "style" : "esriSLSSolid" } } }] }; allRenderers.cdbServiceRenderer2 = new UniqueValueRenderer(cdbServiceRendererParams2);
What you are looking for is "<Null>"
"value" : '<Null>, Prospect'
It took us a ridiculous amount of time to get this. So much pain and frustration for a couple of carats!
Thank you for pointing this out...otherwise, we may never have known. It appears this was a new feature introduced in version 3.24. Neither the "What's New" page nor the documentation for UniqueValueRenderer make any mention of this change.