URL link attached to a variable.

johnney
Kilo Contributor

Good Day,

Is it possible to attach a link in a "Catalog Item Variable" in Service Catalog?

In this case, I really don't know what variable I can use to fulfill this requirement. (I think its "Single Line Text") but anything will work.

Is there a way that I can generate a clickable "link", that can redirect me into another page, "Example: https://google.com".

question.PNG


If there are any workaround, Its still be very helpful also.

Thanks Guys,
JohnF

1 ACCEPTED SOLUTION

Manjul Katare
ServiceNow Employee
ServiceNow Employee

Hi John,



You can try UI Macro type variable which can have URL in it.


See below:


find_real_file.png



Thanks,


Manjul


View solution in original post

10 REPLIES 10

Hi Manjul,



can you please give an example on how to manipulate the href on the ui macro?   is it posiible?


For example onchange of value in the select box variable.



Thanks,


Byron


Sure Bryon!


I'll take a look at this and get back to you.



Have a good day!


-Manjul


Hi Brayan,



Here is an example using UI Macro:



#1: Your URL to access a record producer would be:



https://<instance-name>.service-now.com/com.glideapp.servicecatalog_cat_item_view.do?v=1&pointer_name=servicenow&sysparm_id=906528a10a0a0bf000a85bc20dfb6541



As you can see in the above URL you are passing the email id : &pointer_name=servicenow



#2: Your UI Macro would be:



<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


<j:set var="jvar_pointer" value="${RP.getParameterValue('pointer_name')}" />


  <p>Email Link is : <a href="http://www.${jvar_pointer}.com">http://www.${jvar_pointer}.com</a></p>


</j:jelly>



#3: Your output would be:



find_real_file.png



Hope this help!


-Manjul


Hi Manjul,



Thank yo so much for your reply and   example. is it possible to do it in the client script?



Thanks,


Byron


Hello Manjul,

I do not see the UI macro variable in list in London release there is UI page and Macro variables, did Snow remove the UI macro variable. If yes Do I have to create a Macro and than use it in Record producer ? 

Thank you for you help.

Vish