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

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


Thank you for replying Manjul,



This one works.




Is there also a way to manipulate your "href" in html inside the UI Macro? For example the link will vary dependently for Topic and Subtopic.


John,


There are couple of things you can do:



#1: You can have a key:value pair in URL and then use that as a dynamic value for URL.


#2: You can use system property to change the HREF value each time you may want.


#3: You can manipulate URL for HREF conditionally in the UI Macro itself rather than hardcoding it.



Let me know if you need a snippet for any of the above points.



Thanks,


Manjul


Hi Manjul,



Does #1 involves also UI Macro?
It is very helpful if you can show snippet for #1 and #3 since I think I can generate a new issue if I configure system property.



Thank you