Modifying more than one filter with an action
Hi,
Wanted to add an action that would modify two filters in my dashboard. The id of the input text must contain the index of the filter. Is there a way to modify that so I get both of my filters modified
with the same value?
Input
{
"type": "Input.Text",
"id": "data.filters[0:1].filterJaql.contains",
"class": "",
"title": "New Input",
"placeholder": "Type in the search phrase here"
}
Actions:
{
"type": "Filters",
"title": "Search",
"data": {
"filters": [
{
"filterName": "Question (iQ)",
"filterJaql": {
"contains": ""
}
},
{
"filterName": "Question (Actions)",
"filterJaql": {
"contains": ""
}
}
]
}
}
Tried not adding the index in the Id so it applies to all filters but it didn't work. Was thinking about using dependent filters - setting the first one and then selecting all from the dependent (second). But the dependent filter doesn't accept advanced filtering.
I also tried to move the functionality of resetting filters to default to a Blox action but wasn't successful, all I did was reset multiple filters to "all":true stage but if someone added any other filters to the dashboard that weren't captured by the reset (or modified names of them) then the reset wouldn't work anymore. Getting feedback that users don't like using the filter panel to much therefore wanted this simple reset button to be in the Blox widget.
Thanks for any help with these,
Pawel
-
Hey Pawel,
The filtered view template in Blox has an example of this.
"actions": [{"type": "Filters","title": "New Opportunities","data": {"filters": [{"filterName": "Stage","filterJaql": {"explicit": true,"members": ["Prospect"]}},{"filterName": "Days in Date","filterJaql": {"last": {"count": 7,"offset": 0}}}]}}] -
So you want to filters to be set to the same member?Create two filters the way we have above and then use the same value field as the member for both filters, illustrated below."actions": [{"type": "Filters","title": "New Opportunities","data": {"filters": [{"filterName": "Stage","filterJaql": {"explicit": true,"members": [{panel:value}]}},{"filterName": "Days in Date","filterJaql": {"members": [{panel:value}]}}]}}]
-
Nathan Giusti, this doesn't work for me. My input comes from Input.Text and when I use your approach the second filter remains empty (due to the id path data.filters[0].filterJaql.contains )
Please sign in to leave a comment.
Comments
4 comments