Get value from URL field to display as a clickable field/link

Franchesca Liz1
ServiceNow Employee
ServiceNow Employee

BC.PNG

I have the Prehire Background Vetting form Link as a URL field. How can I make the value from that field as an actual clickable link when it is showed in the widget?..Or how can i get that value to be the link in the "your background form submission" the value of the field varies for each user, all this fields are getting pulled from the HR Profile.

 

On line 11 of the HTML i have this:

<a href="https://www.google.com" target="_blank">Your Background Form Submission</a>

and I want the link to be the value from the Prehire Background Vetting form Link

 

 

Here is the code on the HTML, Client Script and Server script

HTML.PNG  

CS Updated.PNG 

server script.PNG

 

 

 

 

 

1 REPLY 1

Quinten
Tera Guru

Hello Franchesca

 

If I understand your requirement correct, what you are trying is to dynamically define the URL to which the record would navigate.

 

You can use binding to bind the value of the href element to your data stored on the server.

 

<a href="{{c.data.myUrlOnServer}}">Your Background Form Submission</a>

 

You ofcourse first need to generate the target URL on the server script for that.

You can use the GlideURI api for that.

 

Please let me know if I missunderstood the requirement.