How to insert a link in non html field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 03:12 AM
Hello Devs,
I am working on a scenario in which I need to modify the System Properties Value and also I want to make a word from the value as a link.
e.g. "Click Here" this word should have a link.
I have tried with the <a> tag but its not working please suggest me a solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 08:33 AM
Hi @AshishKM , There is a portal widget which has html, server script and client callable and one of these is fetching the value of system property and then it is being displayed to the UI. System property has a sentence as a value in which there is a link. I want to render the system property value as HTML which I am not able to do right now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 08:18 AM
Hi @spimple ,
Description
How to add hyperlinks to string fields?
Resolution
This can be done in 3 ways:
1. You can change the field to a URL field.
2. You can change it to an HTML field and add the link using the insert/edit link button.
3. You can do a customization. I found a few community articles on how other people did this. This is not supported by ServiceNow support.
https://community.servicenow.com/communityid=community_question&sys_id=95ad036ddb9cdbc01dcaf3231f961...
https://community.servicenow.com/communityid=community_question&sys_id=feaa0b2ddb5cdbc01dcaf3231f961...
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 08:39 AM
Hi @Sumanth16 , Its a system property so we cannot convert it to URL or HTML I want to render it to HTML as it contains <a> and its being displayed as normal text. It is being fetched in Script from widget I want to know what change i should do in widget so that i will be able to render the system property value