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

Ash10Patil
Kilo Guru

Hi,

 

In UI policy script tab, select Run Script checkbox to add script and in script section use g_form.showFieldMsg("<field_name>","<message>"); to show message for specific field based on your requirement. This will display message just below the field.

 

Thanks.

Allen Andreas
Administrator
Administrator

Hi,

As noted by the other poster, above, you can use a fieldMessage, but that will show "below" the field and not above.

If you wish to show something above the field, you can considering looking in to "annotations" or if a catalog item, or record producer, you can look at using "label" variables.

Please mark reply as Helpful/Correct, if applicable. Thanks!


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

ritaaudi
Tera Contributor

Thank you for the suggestions. I don't mind it below but is there a way to change it to red or other color than blue to be more alerting?

You can use g_form.showErrorBox("<field_name>","<message>");

It will show error message in red color.