passing a filter in the query string of url not working
I was following this post to no success.
https://support.sisense.com/hc/en-us/articles/230651568-Passing-Dashboard-filters-by-URL-Parameters
var scope = encodeURIComponent(JSON.stringify(
[{
"jaql": {
"table": "Contributions",
"column": "AccountName",
"dim": "[Contributions.AccountName]",
"datatype": "text",
"merged": true,
"title": "AccountName",
"collapsed": false,
"filter": { "startsWith": "all" }
}
}]
));
resulting angular code snippet
<a target="_blank" [routerLink]="['/dashboard', dashboards[0].oid ]" [queryParams]="{filter: '%5B%7B%22jaql%22%3A%7B%22table%22%3A%22Contributions%22%2C%22column%22%3A%22AccountName%22%2C%22dim%22%3A%22%5BContributions.AccountName%5D%22%2C%22datatype%22%3A%22text%22%2C%22merged%22%3Atrue%2C%22title%22%3A%22AccountName%22%2C%22collapsed%22%3Afalse%2C%22filter%22%3A%7B%22startsWith%22%3A%22all%22%7D%7D%7D%5D'}">{{ dataItem.employeeName }}</a>
resulting URL
http://localhost:4200/dashboard/5f89e1cbada09d37ecef1b74?filter=%255B%257B%2522jaql%2522%253A%257B%2522table%2522%253A%2522Contributions%2522%252C%2522column%2522%253A%2522AccountName%2522%252C%2522dim%2522%253A%2522%255BContributions.AccountName%255D%2522%252C%2522datatype%2522%253A%2522text%2522%252C%2522merged%2522%253Atrue%252C%2522title%2522%253A%2522AccountName%2522%252C%2522collapsed%2522%253Afalse%252C%2522filter%2522%253A%257B%2522startsWith%2522%253A%2522all%2522%257D%257D%257D%255D
the report just displays as last rendered in your portal. However, note if i bring up report via portal.. and THEN ADD filter to URL and refersh, it renders report filtered as expected.
https://dev-analytics.smartgistics.com:8081/app/main#/dashboards/5f89e1cbada09d37ecef1b74
Please sign in to leave a comment.
Comments
0 comments