How to display a message above the catalog variable similar to form's annotation info box Red/Blue

learn nv
Tera Contributor

Hi All,

Can we display a message above the catalog variable similar to form's annotation info box Red/Blue(Eg: Annotation message above the planned start date in schedule section of change request ) 

 

1 ACCEPTED SOLUTION

Robbie
Kilo Patron
Kilo Patron

Hi @learn nv,

 

The g_form API is available on catalog items. 

Simply use the same syntax as you would for native forms such as as on the incident table. Example below:

 

g_form.showFieldMsg('name_of_the_variable_to_display_under','Text to display', 'info');
 
Screenshot below to demonstrate.
If you want the message to appear red, change the last parameter of 'info' to 'error' in the g_form call.
 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.

 

Thanks, Robbie

 

Screenshot 2024-01-27 at 20.25.18.png

View solution in original post

4 REPLIES 4

Vishal Birajdar
Giga Sage

Hello @learn nv 

 

Unfortunately not....As we don't have annotation for catalog item

But you can use 'Rich text label' type variable and hide/show based on your requirement.

 

like below :

VishalBirajdar_0-1706334098162.png

 

 

 

  

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @learn nv 

 

We can add only 

LearnNGrowAtul_0-1706380568243.png

 

LearnNGrowAtul_1-1706380628183.pngLearnNGrowAtul_2-1706380652070.png

 

or as suggested by @Vishal Birajdar  use Rich Text.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Robbie
Kilo Patron
Kilo Patron

Hi @learn nv,

 

The g_form API is available on catalog items. 

Simply use the same syntax as you would for native forms such as as on the incident table. Example below:

 

g_form.showFieldMsg('name_of_the_variable_to_display_under','Text to display', 'info');
 
Screenshot below to demonstrate.
If you want the message to appear red, change the last parameter of 'info' to 'error' in the g_form call.
 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.

 

Thanks, Robbie

 

Screenshot 2024-01-27 at 20.25.18.png

Robbie
Kilo Patron
Kilo Patron

Hi @learn nv,

 

Did you see my earlier response, solution, and screenshot?

The g_form API is available on catalog items. 

Simply use the same syntax as you would for native forms such as as on the incident table. Example below:

 

g_form.showFieldMsg('name_of_the_variable_to_display_under','Text to display''info');
 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.

 

Thanks, Robbie