Get filters

Your application can retrieve a list of fields that have been set up as filters and their values by using the getFilters task. The Filters object is returned from the getFilters task and is an ordered list of filter field names.

Your application might create a Filter drop-down list for each item in the fieldNames list. Set the label of the drop-down list to the string value of the fieldNames list. The Filters object also contains an array of filter values associated with each filter field name with the label, which is the text to display in the drop-down list, and the value, which is the field value associated with that label. The label can be the same as the value.

Filters JSON


{
    "topicsServiceContext": {
	TopicsServiceContext object
    },
    "fieldNames": [
        "string"
    ],
    "values": [
        {
            "values": [
                {
                    "label": "string",
                    "value": {
                        "fieldName": "string",
                        "stringValue": "string",
                        "type": "STRING"
                    }
                }
            ]
        }
    ]
}