We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Can we fetch portal url parameters in script include?

shwetha5
Tera Contributor

Can we fetch portal url parameters in script include?

3 REPLIES 3

Sai Kumar B
Mega Sage

@shwetha 

You can add this line to the server side code:


data.parameter_value = $sp.getParameter("parameter_name");

var passParam = new scriptInclude().scriptIncludeFunction(data.parameter_value)


and access the same in client using :



($scope.data.parameter_value);

 

Ankur Bawiskar
Tera Patron

Hi,

can you share your exact requirement and screenshot?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

I want to have dynamic filter for my report

find_real_file.pngI am passing the parameter in the url.

When report loads, script include should trigger and send this url parameter to the report