Multi line message on Service Portal

ServiceNow Adm1
Giga Contributor

Hi Experts,

I have a requirement where on a selection of a variable value on Service Portal, I should display a multi-line message which will have colored text in between and embedded URLs like we have for HTML pages.

It should be displayed only when a specific value is selected and the content will change based on different values. Example; 

Information

This is a test message, it can have anything

Test Links

1 ACCEPTED SOLUTION

Justin77
Mega Guru

I recommend creating a new macro variable and configuring a widget for that one, which would just need the HTML required for the message and links.  Then you can show/hide that variable with a UI Policy.

View solution in original post

9 REPLIES 9

Justin77
Mega Guru

I recommend creating a new macro variable and configuring a widget for that one, which would just need the HTML required for the message and links.  Then you can show/hide that variable with a UI Policy.

If I have to display 10 different messages, I might have end up creating 10 variables and 10 widgets to display different messages.

 

Is this the approach you recommend or anything else you have in mind? 

If that's the case, I would still recommend using macro variables with a widget.  AngularJS is great for displaying dynamic content, so based on certain conditions a single widget can display different messages for you.  Are these 10 different messages all determined by/dependent on other variable options?

Message content will not be derived from any variables but different messages needs to be displayed when a value is selected from one of the variable.

For example, I have a variable called "Category" which has values Mobile, Tablet, Computer

If Mobile then "Some text about mobile"

If Tablet then ""Some text about mobile" etc