Hi Anitha,
Check the
pcs.getPageContext().updateFilterContext function
This sets the filter on 2011:
pcs.getPageContext().updateFilterContext(
{
"sourceId": "model00000183c8404a03_00000002",
"itemId": "page_7.Year_",
"itemName": "Year",
"dataType": "integer",
"isHierarchy": false,
"isNamedSet": false,
"scope": "model00000183c83ff8df_00000002",
"eventSourceId": "NonNumericFilterController9"
}
, {
"command": "replace",
"values": {
"page_7.Year_->[2011]": {
"u": "page_7.Year_->[2011]",
"d": 2011,
"value": "page_7.Year_->[2011]",
"label": 2011,
"selected": true
}
},
"exclude": false
})
------------------------------
Paul Mendelson
------------------------------
Original Message:
Sent: Mon October 10, 2022 06:56 AM
From: Anitha Royal
Subject: RE : Running Dashboard using Javascript API (ca-dashboard-js-api) with Customised Extension
Hello Paul ,
Thank you for your response , with this class object we can just get the values of tab filters(saved values) but was looking to modify(edit) the Tab filter values using API same like Global Filters
------------------------------
Anitha Royal
------------------------------
Original Message:
Sent: Fri October 07, 2022 08:07 AM
From: Paul Mendelson
Subject: RE : Running Dashboard using Javascript API (ca-dashboard-js-api) with Customised Extension
The only place I've seen to access tab filters is through here:
var pcs = __getDashboardAPI().getFeature('PageContextService')
, items = pcs.getPageContext().getPageContextItems()
The items array has the tab filters. Use item[x].getScope() to match to a specific tab.
------------------------------
Paul Mendelson