- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2014 08:06 AM
Hi,
While calling a UI Page through UI Action how can I pass a parameter to below line in UI Page.I have a UI page to display po header with line items and I would like to know how can I pass the current PO number to retrieve the data for that particular po.
gr.addQuery ('number','=','parameter_from_url');
Any help in this regard will be highly appreciated.
Thanks,
Sami.
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2014 03:06 AM
Here we go...
assume the following is your url:
https://instance.service-now.com/ui_page.do?sysparm_id=6e1e02ac4d3c5d00407eccb253aa2b13
Retrieve Parameter Value from within a UI page:
<g:evaluate var="sysparm_id">
var sysparm_id = RP.getParameterValue("sysparm_id"); -> here you specify the name of your parameter !
sysparm_id;
</g:evaluate>
Use parameter in your script:
<g:evaluate var="jvar_user" object="true" jelly="true">
var gr = new GlideRecord("sys_user");
gr.get(jelly.sysparm_id);
gr;
</g:evaluate>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2014 03:55 AM
Many thanks Makosko for the help,yes it worked fine
Sami.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2016 04:56 AM
Hi Sam,
Did you later write a client script to set the value that you got?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2017 05:21 AM
Hello, i am searching to pass values in url and to store it in a table. where do i need to use these codes.. In Business rule ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2016 04:55 AM
Hi All,
This is a jelly scripting written in detail template of Content type of content management module.
On click of the 'OK', it redirects to a test screen where it is supposed to populate the value in a field. I am getting the sysid in the url.
How to pass the value of the record to a field(which is a reference field) in Test Page. So like we if clik on abc1 record, then id field of Test should show abc1.
Do I need to write a client script to take the sysid from the url and set the value of a field. If so, then how to achieve that?
Any help in this regard will be appreciated.
Thanks
Surya