Passing parameter in url of UI Macro

sowmyaj
Giga Expert

Hi All,

I need to pass multiple parameters in url as shown below in ui macro. '&' is showing error. I replaced with & ,& and ${AMP;} then I'm getting the error "The reference to entity "sysparm_task_assessment" must end with the ';' delimiter. "

var url = "com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=84c65f1daca36100e1ab6d54a23c92cc"

url += '&sysparm_project_name=' + current.u_project_name;

url += '&sysparm_tenant=' + current.u_acronym;

url += '&sysparm_operations_area=' + current.u_operations_area;

url += '&sysparm_admin_group=' + current.u_ad_group_name;

url += '&sysparm_first_name=' + first_name;

url += '&sysparm_last_name=' + last_name;

url += '&sysparm_email=' + email;

action.setRedirectURL(url);

Can any one help me to fix this issue.

Thanks,

Sowmya

4 REPLIES 4

ramireddy
Mega Guru

Encoding value for & is %26. Can you try that?



HTML URL Encoding Reference


tanumoy
Tera Guru

Use & instead of &


Chuck Tomasi
Tera Patron

You can also try replacing & with ${AMP} (or $[AMP] if you're in phase 2, which I often find works better for a UI macro.) & is special, so even & is going to have issues in Jelly.



See episodes 1-3 here: TechNow Episode List


Miguel Aizer Es
Tera Contributor

Hi,

I have encountered this issue.

I know the question is old but maybe people will get here.

Writing "&" worked for me. It seems it has 2 levels of encoding so you need the first & to get the final &

 

Hope it helps.