How to add text as well as hyperlinks in a worknotes section of a catalog task?

User205031
Tera Contributor

Hello All,

 

I have a requirement to add few texts as well as hyperlinks in the worknotes section of a catalog item through Flow designer.

 

In the worknote of the catalog task it should look like:

 

Platforms Included:

ABC

 

Form Definitions link : Link of a confluence page

Once Complete, please save the RITM Number in the unlocked field in the request details, then close the task.

 

I am able to add the hyperlink, but not sure how to add the rest of the text together with hyperlink.

 

Need help on this.

 

Thanks in advance!

1 ACCEPTED SOLUTION

@User205031 

you can add normal text before or after

Example:

var recordID = '8cde67a0476371106e76d967436d4313';
var displayText = 'Hello';
var workNotes = 'My Normal Text Before' + '[code]<a href="esc?id=sc_cat_item&table=sc_cat_item&sys_id=' + recordID + '">' + displayText + '</a>[/code]' + 'My Normal Text Later';
return workNotes;

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

7 REPLIES 7

Mark Manders
Mega Patron

Show what you already have, because I'm not sure where you are stuck. You landed the difficult part with composing the link. The rest of the text should be simple typing in the field (or adding to the script, depending on how you have setup your flow in relation to setting the work note).


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Hi Mark,

This is how I have written in the script section of Work note in the flow designer to display the hyperlink:

 
var recordID = '8cde67a0476371106e76d967436d4313';
var displayText = 'Hello;
ar workNotes = '[code]<a href="esc?id=sc_cat_item&table=sc_cat_item&sys_id=' + recordID + '">' + displayText + '</a>[/code]';
return workNotes;
 
But not sure how to add the normal text in the script section:

Platforms Included:

ABC

Once Complete, please save the RITM Number in the unlocked field in the request details, then close the task.

 

The above texts I need to show in the worknote along with the link.

var recordID = '8cde67a0476371106e76d967436d4313';
var displayText = 'Hello;
ar workNotes =  "Form Definitions link: " + '[code]<a href="esc?id=sc_cat_item&table=sc_cat_item&sys_id=' + recordID + '">' + displayText + '</a>[/code]' + "Once Complete, please save the RITM Number in the unlocked field in the request details, then close the task.";
return workNotes;

 

 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Ankur Bawiskar
Tera Patron
Tera Patron

@User205031 

Unless you share what you have used and how it's added we can't help.

To add link in work_notes you need to wrap text within [code][/code] tags

If my response helped please mark it correct and close the thread so that it benefits future readers.

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