AnsweredAssumed Answered

Add item to unique list

Question asked by mhylden on Oct 1, 2015
Latest reply on Oct 1, 2015 by rscheitlin

The filter on a query is pretty clear on how to add a drop down for user to select from the unique values in a field.  What I would like to do, however, is add an item at the top of the list for 'All Values', so that the user could either select something specific or not select any item at all.

 

I've found where the filter item is created in the configuration JSON, but it just appears to have a type of unique that finds the values from the field in the feature layer, but is it possible to add to the list?

 

Example JSON for the filter:

"filter": {

        "logicalOperator": "AND",

        "parts": [

          {

            "fieldObj": {

              "name": "DEVICE_TYPE",

              "label": "DEVICE_TYPE",

              "shortType": "string",

              "type": "esriFieldTypeString"

            },

            "operator": "stringOperatorIs",

            "valueObj": {

              "isValid": true,

              "type": "unique",

              "value": "Pole"

            },

            "interactiveObj": {

              "prompt": "Device Type is",

              "hint": "type of device"

            },

            "caseSensitive": false,

            "expr": "DEVICE_TYPE = 'Pole'"

          }

        ],

        "expr": "DEVICE_TYPE = 'Pole'"

      },

Outcomes