How to change "instructions" value of a element via script?

R B
Tera Contributor

Hello Everyone,

 

How can i set the "Instructions" value of an element via script?  my requirement is to change this value on the fly based on the account. 

I am not sure which property or method to use to set this value? Any help please? 

 

RB_1-1666294459152.png

 

8 REPLIES 8

Mike_R
Kilo Patron
Kilo Patron

Not sure if that's possible without DOM. 

You'll be better off using g_form.showFieldMsg()

https://docs.servicenow.com/bundle/sandiego-application-development/page/script/useful-scripts/refer...

R B
Tera Contributor

Thanks, Mike, this helps. I am able to display the field message, but this disappears as soon as a click on the form happens.  is there a way to make this message stick? 

Are you using an onLoad client script?

R B
Tera Contributor

yes i am