Get the URL parameter on ui page

Akihiro
Tera Contributor

I want to transfer some values on form to ui page. So that I'm thinking about implementing UI action that gets some values on form and set these values on url and opens UI Page.

Now I'm trying to get url values and set these values on the UI Page. So that I use following Module and UI Page. But I can't use "RP.getParameterValue()" method to get url parameter. 

Please tell me the way to get url parameter on ui page.

[Module Description]

Arguments:https://(instance_id).service-now.com/ui_page.do?sys_id=(sys_id)&sysparm_id2=111111111

[UI Page Description]

HTML:

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="sysparm_id2">
var sysparm_id2 = RP.getParameterValue('sysparm_id2');
sysparm_id2;
</g:evaluate>
<g:ui_form>
<input type="text" name="myparam" value="${sysparm_id2}" />
<button type="submit" name="search" value="search">serch</button>
</g:ui_form>
</j:jelly>

 
6 REPLIES 6

Hi Michael Jones, 

I am facing 1 problem. When I get sysparm_query in UI Page by  RP.getParameterValue('sysparm_query').

Ex: 

https://Test/x_ntt85.do?sysparm_query=fw_db_src_hostnameSTARTSWITHtest#ABCD1234

All characters after "#" is ABCD1234 is deleted

Do we have a solution for this?

Narayana Reddy
Tera Contributor

i have tried same in the workspace , it is not working ,