Dynamic hyperlink variable

Sylvain12
Tera Contributor

Hi Everyone,

 

Is it possible to display a dynamic hyperlink in a variable ? And is it possible in a MRVS ?

Only variable to display hyperlinks seems to be Rich Text Label, but not dynamically...

 

Thank you very much in advance for your support

 

Kr

 

7 REPLIES 7

sumanta pal
Kilo Guru

Yes, it is possible to display a dynamic hyperlink in a ServiceNow variable. However, it's not directly possible in a Multi Row Variable Set (MRVS). You can use a UI Macro to create a dynamic hyperlink in a variable. Here's a step-by-step guide on how to do it: 1. Create a UI Macro with the following code: xml ${jvar_n} 2. Create a variable of type 'Macro' in the catalog item and select the UI Macro you created in the previous step. 3. Now, when you use this variable in a catalog item, it will display a dynamic hyperlink based on the current record. For MRVS, you can't directly use a dynamic hyperlink. However, you can use a workaround: 1. Create a 'Reference' type variable in the MRVS. 2. In the 'Reference' field, you can use a dynamic filter to display records based on certain conditions. 3. The 'Reference' field will display a hyperlink to the referenced record. Please note that these methods require some knowledge of Jelly scripting and ServiceNow administration. Always test your changes in a non-production environment before applying them to production.

 

Sylvain12
Tera Contributor

I could not include the hyperlink in the MRVS, so I rebuild the matrix in a UI Page so I could add the hyperlink.

 

Thank you very much to all for your support !

Sure, you can create a UI Page in ServiceNow to include hyperlinks in a matrix. Here are the steps:

1. Navigate to "System UI" > "UI Pages".
2. Click on "New" to create a new UI Page.
3. Fill in the necessary fields:
- Name: Enter a unique name for the UI Page.
- HTML: Here you can write your HTML code to build the matrix. You can use HTML table tags to create the matrix and anchor tags to include hyperlinks.
4. Click on "Submit" to create the UI Page.

Here is a sample code for a UI Page with a matrix and hyperlinks:

html

 

 

 

Firstname Lastname Link
Jill Smith Google
Eve Jackson Yahoo

 

 


Remember to replace the URLs and other data with your actual data.


nowKB.com