how to get Parameter from URL in Jelly Script

Jiang Yang
Tera Contributor

Hello,

I am trying to get parameter from the URL in Jelly Script

URL - https://xxxxxx.service-now.com/nav_to.do?uri=%2F$pa_dashboard.do%3Fsysparm_dashboard%3De59a38708701011068c6ca280cbb355a%26params_requester%3D3a8965143b1c445052ca655593efc4e6

I have tried the below code

<g:evaluate var="jvar_wbsid">
var value = RP.getParameterValue('params_requester');
value;
</g:evaluate>
<g:ui_reference name="QUERY:active=true" value = "${jvar_wbsid}" id="assigned_to" table="sys_user" />
<span>${jvar_wbsid}</span>

 

Result :

null

 

This works when i try to get sys_id but returns blank when used for params_requester

Is there any way to get it work for other parameters?

17 REPLIES 17

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

try with this

<g:evaluate var="jvar_wbsid">

var value = RP.getWindowProperties().params_requester;
value;
</g:evaluate>

Regards
Ankur

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

Thanks Ankur Bawiskar for your response.

I tried that ,but it is doesn`t work . below message is displayed .

 

find_real_file.png

Hi,

can you share if you are forming the URL and then redirecting it?

did you try for sysparm_dashboard

Regards
Ankur

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

I try to set sysparm_dashboard, but same issue

find_real_file.png