Skip To Content
Get In Touch

Search...

Page code to set multiple Filter Sets on VF page

This sample represents page code required to set multiple Filter Sets on custom CA Visualforce page

oResultAPI.setFiltersPanel({

filterSets : [{ // list of JSON objects

“name”:”API Used”, // title

‘type’ : “custom”, // type – custom

“criteria” : [ // list of criterias

{“name”:”isalldayevent”,”object”:”event”,”oper”:”equal”,”value”:”on”,”text”:”on”}, // (name of the field, object name, operations, value, text value)

{“name”:”type”,”object”:”event”,”oper”:”contains”,”value”:[“2″,”3″],”text”:”2,3″}],

“id”:”f1″}, // id – any unique number

{“name”:”Test”, ‘type’ : “custom”, “criteria”:[{“name”:”isalldayevent”,”object”:”event”,”oper”:”equal”,”value”:”on”,”text”:”on”}], “id”:”f2″},

]

});

setFiltersPanel – is anew API function to define filterSets and filter fields
filterSets – is a parameter to define filterSets

It is an array and each element of array is an JSON object.

Each object includes:

  • “name” – title of the filter set
  • ‘type’ – special type for such filter sets, only custom is a correct value
  • “criteria” – Array of criterias (split by comma)

Each Criteria is a JSON object:

  • “name” – API lowercase name of the field
  • “object” – API lowercase name of he object
  • “oper”:”equal” – operation type, equal is a correct choice
  • “value” – value for the field, it is different for different field types
  • “text”: – text value for the criteria, used for Reference fields

Ready to see results?

Request a demo