How to add a hyperlink to flow designer?

Radhika11
Tera Contributor

Hello,

Can someone please provide suggestion on how we can use Flow Designer to add a hyperlink in RITM Work Notes to a change recorder?

 

Thank you

find_real_file.png

1 ACCEPTED SOLUTION

Hi,

just try this

var sysId = fd_data._7__for_each.item.sys_id;

var tableName = 'change_request';

var number = fd_data._7__for_each.item.number;

var url = '<a href="' + '/' + tableName + '.do?sys_id=' + sysId + '">' + number + '</a>';

return '[code]' + url + '[/code]';

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

23 REPLIES 23

Maik Skoddow
Tera Patron
Tera Patron

Hi

HTML-code at "work notes" or "additional comments" has to be wrapped as follows

[code]<a href="http://www.servicenow.com">Link</a>[/code]

Kind regards
Maik

If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

Hello Maik,

I have tried your suggestion by entering the following HTML code at Work Notes. 

[code]<a href="https://xxxxx.service-now.com/nav_to.do?uri=change_request.do?sysparm_query=number=CHG0030016">Link</a>[/code]

It created a link.

find_real_file.png

 

However, when I clicked on link, it did not open the change recorder. It took me to a blank page.

find_real_file.png

 

Apologies for this being a bit late, but I was also running into this situation and resolved it by adding a target="_blank" statement within the <a> tags. So the URL would look like something below:

 

[code]<a target="_blank" href="https://xxxxx.service-now.com/nav_to.do?uri=change_request.do?sysparm_query=number=CHG0030016">Link</a>[/code]

 

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Radhika,

it should be this in the f(x) script

var sysId = fd_data.trigger.current.sys_id;

var tableName = fd_data.trigger.current.sys_class_name;

var number = fd_data.trigger.current.number;

var url = '<a href="' + gs.getProperty('glide.servlet.uri') + '/nav_to.do?uri=' + tableName + '.do?sys_id=' + sysId + '">' + number + '</a>';

return '[code]' + url + '[/code]';

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader