Can we populate Hint dynamically for a field in ServiceNow when we hover mouse over the field?

kBahu
Tera Expert

Need to populate Hint dynamically for a field in ServiceNow when we hover mouse over the field, any suggestions would be helpful.

kBahu_0-1734685884105.png

 

Thanks.

1 ACCEPTED SOLUTION

For everyone who wants to refer, below worked in scoped application

g_form.getControl('assigned_to').title = 'Test';
 
so looks like ''gel'' or ''document.getElementById()'' doesn't work in scoped app but ''g_form.getControl()'' works fine.

View solution in original post

16 REPLIES 16

Hi @Ankur Bawiskar actually requirement is to show field color and hint both dynamically based on some other field value so needed this.

@kBahu 

it would require DOM manipulation which I won't recommend.

Please inform your customer about this as it's not a best practice

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

For everyone who wants to refer, below worked in scoped application

g_form.getControl('assigned_to').title = 'Test';
 
so looks like ''gel'' or ''document.getElementById()'' doesn't work in scoped app but ''g_form.getControl()'' works fine.

@kBahu 

g_form.getControl will work but it is supported only in native

Also I don't think it can change the field hint, it can change the label or color etc

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

Yes, we require it in Native only, like below I am able to change hint dynamically.

kBahu_1-1735053386742.png

 

kBahu_0-1735053346810.png

kBahu_2-1735053436720.png