Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

Hide fieldmsg for a variable

servicenow14710
Tera Expert

Hello developers,

I have used two showFieldMsg for same variable as i needed the field msgs to be in different lines.

g_form.showFieldMsg('varName', 'message.', 'info', 'true');
g_form.showFieldMsg('varName', 'Reason:due to this', 'info', 'true');

 

 

Now based on change of requester for i need to hide this showFieldMsg. which should hide both lines when i use

g_form.hideFieldMsg('varName'); it is only hiding one line, Please suggest. Any help is highly appreciated. Thanks!

1 ACCEPTED SOLUTION

AshishKM
Kilo Patron

Hi @servicenow14710 , 

Did you try hide line twice, if it works or not.

 

g_form.hideFieldMsg('varName');

g_form.hideFieldMsg('varName');

 

-Thanks,

AshishKM

 

View solution in original post

2 REPLIES 2

AshishKM
Kilo Patron

Hi @servicenow14710 , 

Did you try hide line twice, if it works or not.

 

g_form.hideFieldMsg('varName');

g_form.hideFieldMsg('varName');

 

-Thanks,

AshishKM

 

servicenow14710
Tera Expert

Thanks! surprisingly it worked, Thanks for the suggetsions