Pricing changes are coming in January. Contact our Sales team to secure the current price for your desired license.

How to access filters report data in the fields dialog window

Answered
vinoth asked on September 11, 2024

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.

6 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster September 12, 2024

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

Public
vinoth September 12, 2024

Hi,

When the user clicks on "APPLY" button in fields dialog. I need to get the items present in the
"Reports filters" card.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster September 13, 2024

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

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster September 25, 2024

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

Public
vinoth September 25, 2024

Yes its working . thanks.

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster September 25, 2024

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

Please login or Register to Submit Answer