How to show help text based on user company

Sriram Pusuluri
Tera Contributor

Hi Team,

 

How to show help text based on user company.

 

I have a company called "Jordons" for this company I want to show help text.

 

for remaining companies I don't want to show help text.

 

For this I have client script written,

 

 

 

SriramPusuluri_0-1777979925579.png

 

 

On Change

 

SriramPusuluri_1-1777979994147.png

 

 

script is not working, what changes required

 

4 REPLIES 4

Nilesh Pol
Kilo Sage

Hi @Sriram Pusuluri 

 

As ServiceNow does not have a native setHelpText() method in the standard g_form API and the best practice is to use g_form.showFieldMsg();

e.g.

g_form.showFieldMsg('short_description', 'Welcome Jordans Team! Please follow internal guidelines.', 'info');

Mark Manders
Giga Patron

Just use a ui policy. Set it to trigger only on that company and in the action use the variable name and the field message option. No need for scripting at all.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Ankur Bawiskar
Tera Patron

@Sriram Pusuluri 

you can't show/hide help text dynamically near variable

Either you show it completely or don't show

you can show field message near that variable using g_form.showFieldMsg() or g_form.hideFieldMsg()

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Tanushree Maiti
Kilo Patron

Hi @Sriram Pusuluri ,

 

Check the steps and screen shot from this post for the workaround as Servicenow does not provide this dynamic help text feature OOB.

 

Refer: https://www.servicenow.com/community/developer-forum/change-help-text-based-on-multiple-choice-selec...

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: