- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 08:21 AM
Hi everybody,
I have to show a message in my catalog items form. This message has to be in html format because is a bit log and the customer wants to see Underline and break-line.
I created the following catalog client script, but it doesn't work.
function onChange(control, oldValue, newValue, isLoading){
var choiceValue = g_form.getValue('var_1');
var knowledgeMessage = "<u>Service Availability Window<u>: h24 <br>
<u>Maintanance Window<u>: once every three months and Sunday redslot <br>
<u>Backup Weekly<u>: retention 30 days <br>
Backup Monthly: retention 12 months <br>
";
if (choiceValueNeededFor != 'none') {
if (choiceValueNeededFor == 'application') {
g_form.showFieldMsg('var_1', knowledgeMessage,'info');
}
}
}
Please, could you help me? Thanks a lot.
Mara Bin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 11:27 PM
Hi Mara,
You can achieve this requirement by using a new Variable of type Macro. I have answered similar question earlier, please refer that here: Annotations without a variable field on Record Producer .
Again to use the HTML text, such as <a> tag or <br> tag, you need to change the system property (change it to false) 'glide.ui.escape_text' for this. Note: Please do remember that it will change globally. Please refer section 3 here: http://wiki.servicenow.com/index.php?title=High_Security_Settings
I hope this helps. Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 11:27 PM
Hi Mara,
You can achieve this requirement by using a new Variable of type Macro. I have answered similar question earlier, please refer that here: Annotations without a variable field on Record Producer .
Again to use the HTML text, such as <a> tag or <br> tag, you need to change the system property (change it to false) 'glide.ui.escape_text' for this. Note: Please do remember that it will change globally. Please refer section 3 here: http://wiki.servicenow.com/index.php?title=High_Security_Settings
I hope this helps. Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 12:01 AM
Thank you a lot for the Annotations document. Really useful.
Now I've just to try it!
Regards
Mara
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 12:30 AM
Hi marabin ,
Please let me know if you face any issue while implementing the same.
Also, if your issue is resolved please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. If so, please review How to Mark Answers Correct From Inbox View
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2024 06:37 PM
Your link is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2017 12:43 AM
Hi Mara,
If you would like to display the HTML content in service portal for the catalog item variable then create a new widget and embed the HMTL content. Finally, tag that widget to the required variable, the message will get displayed under that variable.