How to add message on field in ui policy

ritaaudi
Tera Contributor

Hi: I want a mesage to display on top of a field in a UI Policy. Any thought on how to do that?

Thank you!

1 ACCEPTED SOLUTION

find_real_file.png

to make it red, use 

g_form.showErrorBox("state" , "message info", true); 

 

View solution in original post

10 REPLIES 10

find_real_file.png

to make it red, use 

g_form.showErrorBox("state" , "message info", true); 

 

Hello,

The other poster had already mentioned the error message above this person, but if that was correct to you, then so be it.

My only disclaimer with all this is that while the red color "grabs attention more"...the purpose of that color is to indicate an "error" and is used that way across the platform.

So if you use it for other means, not as an error, then it may confuse users across the platform when that pops up. Just mentioning that for the user experience side of things.

Anything that wasn't there before...that pops up, be it blue or red, would grab attention pretty well. The red is usually universally done to indicate an error.

Please mark reply as Helpful, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Shubham Tipnis
Kilo Sage
Kilo Sage

Hi,

You can create a annotation field in your table. Then add the field in UI Policy Action under the UI Policy which you created. In below pic. consider Caller as an annotation field.

 

find_real_file.png

 

Please mark correct and helpful if applicable.

Regards,

Shubham

Regards,
Shubham Tipnis
 ServiceNow Enthusiast
️ 3x Rising Star (2022–2024) – ServiceNow Community
 Sharing insights, use cases & real-world learnings from the Now Platform
 Always learning. Always building.

Prasad Pagar
Mega Sage

Hi @ritaaudi ,

Any reason you want to use UI policy for showing message?

You can use Client scrip or Business rule for the same

UI Policy - 

find_real_file.png

Thank you
Prasad

MS25
Mega Sage

Upgrade to Washington. If it is a Catalog UI policy new features are there: 
Set Field Value" option in Catalog UI Policy Action. Previously, we could only clear field values, but now, we can dynamically set field value. 
We can now also dynamically set "Field Messages" and define the field message type. 

MS25_0-1714662338281.png

 


Please mark this answer correct if it helps you