How can I add 'Click here' before the hyperlink on hrm_todos_page on esc portal?

Kruthika1
Tera Contributor

Kruthika1_0-1770210748127.png

Hi community,

 

How can I add 'Click here' before the hyperlink on hrm_todos_page on esc portal?

3 REPLIES 3

Kruthika1
Tera Contributor

I tried to update the Body HTML template in the widget, from -

<a id="{{data.sysId}}_todo_link" ng-href="{{data.url}}" aria-label="Parent task, {{::data.displayValueList[1]}}" ng-bind-html="::data.displayValueList[1]"></a>

to this -

<a id="{{data.sysId}}_todo_link" ng-href="{{data.url}}" aria-label="Parent task, {{::data.displayValueList[1]}}" ng-bind-html="'Click here'+::data.displayValueList[1]"></a>

but this did not work.

KanteS
Giga Guru

Hi,

 

ng-bind-html does not support string concatenation, so adding text like 'Click here' + value will not work in this case.

Since you only need to show static text before the hyperlink, you can remove ng-bind-html and directly place the text inside the anchor tag.

 

Please try the below code:

<a id="{{data.sysId}}_todo_link"
ng-href="{{data.url}}"
aria-label="Parent task, {{::data.displayValueList[1]}}">
Click here {{::data.displayValueList[1]}}
</a>

 

If this resolves your issue, please mark this response as the correct answer and give it a like. It will help others find the solution more easily.

 

Ankur Bawiskar
Tera Patron

@Kruthika1 

It shows the hyperlink for HR Case for me. HR Case + Short Description

Is that not happening for you?

AnkurBawiskar_1-1770212484740.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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