RP.getParameterValue is not returning anything
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2020 03:19 AM
Hi,
I've been writing a UI Macro. I am trying to fetch the sysparm_id from the URL. I've used RP.getParameterValue function in Jelly, but the debug shows that this function isn't returning anything.
Here's the code:
<g:evaluate var="jvar_show_encrypt" jelly="true">
var id = "${RP.getParameterValue('sysparm_id')}";
gs.log('Inside Macro' + id); //This just shows Inside Macro
</g:evaluate>
Also, I'm trying to use this in attachment_encrypt UI Macro that is shown inside the attachment popup. Are the URL Parameters available here, because I tried the same code in a different macro that was on a page and it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2020 09:08 PM
Hi Michael,
Thanks for replying.
I tried both the methods. The first one returns undefined whereas the second one doesn't return anything.
Any idea why this might be happening?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 04:22 AM
Can you provide the code where you are calling your macro? I'd say maybe try hardcoding a value for sysparm_id and see if your hard coded value gets passed to the macro. If it does then we need to look at who you are setting that value / parameter.
If this was helpful or correct, please be kind and remember to click appropriately!
Michael Jones - Proud member of the CloudPires team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!