The CreatorCon Call for Content is officially open! Get started here.

Display InfoMessage permanently on list header

eswarijk
Tera Contributor

I need to display Info Message permanently on the top portion of list view.

Whenever I access the List from the Application menu, the Info Message will be visible in the list header

Hereby attached an image for further reference...

Screenshot (206).png

How to implement this ?

10 REPLIES 10

I tried this one too...


But it is showing the following error message in List View



Function flushMessages is not allowed in scope x_38340_sd

I think I misinterpreted the question.


What are you expecting to happen vs what actually happens?



I'm confused as to what is triggering the message.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Nikolai5
Kilo Contributor

Hi, eswarijk

I want to display a message on a UI List on page load, have you found a solution for this task?

I found and used everything I found on this topic but still have problems when I edit the cells in the list, the message displayed again

I created BR Before/Query

Advanced:

gs.clearMessages();
var index = gs.action.getGlideURI().toString().indexOf('pm_project_list'); // to display only on UI List
if(index != -1){
  gs.addErrorMessage('Please, stop all work until the notification disappears.');
}

Best regards,
Nikolai Khvedantsevich

 

My dirty solution was to use the "List Control" adding the message to the "Omit links condition" (you can add this to the page using the "Form Designer") using this code:

gs.flushMessages();
gs.addInfoMessage("This is the message to display");
false;  // or true if that's what you want!

Result:

find_real_file.png

Any unintended consequences from using this method on lists?