How to use interactive filters on service portal ?

Mehak1
Giga Expert

Hi All,

I want to add the interactive filters in the service portal page.

My requirement is, when anyone changes the filters showing above on the page then all the reports on portal page needs to be changed as per the selected filters. 

For showing reports, I have used the 'report' widget on my portal page. But I am not able to use the interactive filters in Service Portal.

Can anyone guide me how to implement it ? or Is there any widget by which we can use the reports interactive filters functionality?

 

Thanks & Regards,

Mehak Arora

2 REPLIES 2

ridhikaushik
Kilo Contributor

Hi Mehak,

I am working on the similar requirement. Did you manage to get a solution for this?

Thanks.

Ravinder Damera
Tera Contributor

Hi Mehak,


Create normal input field and pass value to the Cloned report widget.

Please clone OOB "Report" widget and change the code in Client controller by adding query parameters as below inside $timeout, it will work:
$timeout(function(){
var report_query = "--YOUR EMBEDDED QUERY GOES HERE--";
var params = {sysparm_report_id: reportId,
sysparm_table: "--TABLE NAME--",
sysparm_type: "--By default it takes line chart or you can pass report type backend value--",
sysparm_query: report_query};
var targetEl = $("#report-widget-"+c.rectangleId);
//embedReportById(targetEl, reportId); //Already existing OOB function will comment or remove and use below one
embedReportByParams(targetEl, params); //This function build report with Params
});

For more details about this Params you can refer below link:
https://docs.servicenow.com/en-US/bundle/utah-now-intelligence/page/use/reporting/concept/c_Embeddin...

Thanks,

Ravinder Damera