RP.getParameterValue is not returning anything

Sanjay14
Kilo Explorer

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.

6 REPLIES 6

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?

 

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!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!