always show 'g_form.showFieldMsg'

Mi4
Tera Expert

Hi,

This is a simple question.

I'm a record producer and want to always have a message at the bottom of the field.

How is it best practice to implement it?

 

Thank you in advance,

1 ACCEPTED SOLUTION

Hitoshi Ozawa
Giga Sage
Giga Sage

Comment out the generated isLoading || newValue if condition block.

function onChange(control, oldValue, newValue, isLoading) {
   //if (isLoading || newValue == '') {
   //   return;
   //}

   g_form.showFieldMsg('field_1', 'This is a showFieldMsg message', 'info');
   
}

find_real_file.png

View solution in original post

7 REPLIES 7

Hi,

Thank you so much.
I worked it!

Regards,

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

You can create help text which will always be shown on portal for that variable; but it would be shown on top

find_real_file.png

I just checked using onLoad client script and it seems to clear the message if you change the value

So please use onChange client script

function onChange(control, oldValue, newValue, isLoading) {
   g_form.showFieldMsg('variable', 'This is my message', 'info', true);
}

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi,

Thank you.
I worked it!

Regards,