- 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-08-2017 01:40 AM
Thank you Mohan. For the Service Now POrtal i think this one is the correct way to proceed. I will try it.
regards
Mara