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

Hi,

you did not copied it full

give quotes for table name, sys_id, number

var url = '<a href="' + gs.getProperty('glide.servlet.uri') + '/nav_to.do?uri=' + 'change_request' + '.do?sys_id=' + 'c83c5e5347c12200e0ef563dbb9a7190' + '">' + 'CHG0030016' + '</a>';
 
return '[code]' + url + '[/code]';

Regards
Ankur

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

Good morning Ankur,


1. Here is the code in f(x)

var url = '<a href="' + gs.getProperty('glide.servlet.uri') + '/nav_to.do?uri=' + 'change_request' + '.do?sys_id=' + 'c83c5e5347c12200e0ef563dbb9a7190' + '">' + 'CHG0030016' + '</a>';
return '[code]' + url + '[/code]';

2. It created a link in RITM work notes

find_real_file.png

 

3. However, when I clicked on the link, it did not open 'CHG0030016', but instead it took me to here.

find_real_file.png

 

4. Since the "Change Request Record Number" value is dynamic, is it possible to pass Change Request Record Number in to the f(x) is Instead of hard-coding the "number"?

find_real_file.png

Hi,

yes you can get it dynamically

just use fd_data and then dot walk to that action and get the sys_id

Regards
Anku

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

Hello Ankur,

Could you please help? when I clicked on the link, it did not take me to the specific change recorder.  It took me to this page.

find_real_file.png

 

Hi,

can you right click and copy the link and check what it is?

Regards
Ankur

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