Hi Team,
i want to access report filters data when the user clicks on "APPLY" button in the fields dialog.
pivot.on('fieldslistclose', function () {
showOutput('Field list is closed!');
});
iam getting the callback when the user clicks on "APPLY" button using the above code. But i want to access report filters data when the user clicks on "APPLY" button.
Hello,
Thank you for reaching out to us.
Could you please provide us with more details on your use case? How do you want to use data in the fieldslistclose
event?
Looking forward to hearing from you.
Kind regards,
Nadia
Hi,
When the user clicks on "APPLY" button in fields dialog. I need to get the items present in the
"Reports filters" card.
Hello,
Thank you for providing us with the details.
We recommend using the getReport
API call in the callback of the fieldslistclose
event. For example:
pivot.on('fieldslistclose', function () {
let report = pivot.getReport();
let reportFilters = report.slice.reportFilters;
if(report.slice && report.slice.reportFilters) {
console.log(reportFilters)
}
});
You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/Lqhzvstc/
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia
Hello,
Hope you are doing great!
We were wondering if you had a chance to check the suggested approach. Could you please confirm if the solution works for you?
Looking forward to hearing your feedback.
Kind regards,
Nadia
Yes its working . thanks.
Hi,
Thank you for the feedback!
We are glad to hear that it works for you.
Do not hesitate to contact us if other questions arise.
Kind regards,
Nadia