How to hide the "Help Text" on a variable, on a form based on the catalog item?

Bob20
Tera Contributor

I would like to hide or set the help text we have on variable on a form. The variable is part of a Variable Set which is used throughout our catalog. However, some items are not IT related and I would like to hide or set the Help Text if a specific catalog item is selected.

find_real_file.png

I guess the trick is to find the object property that would be set to a string if the condition is met.
Kind of like:

If this is a not IT Request {
    Set the help text to "For more information contact Marketing Ext 3333"
} else {
    Set the help text to "If you are making a request on behalf of someone else, please contact the IT-Servicedesk."
}

I just need to know how to access the property of the help text.Something like:
g_form.setValue('requestor_name').helpText = "For more information contact Marketing Ext 3333"
...or whatever

Thanks.

Bob.

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Bob,

 

Following links should help you:

https://community.servicenow.com/community?id=community_question&sys_id=e7ffcba5dbdcdbc01dcaf3231f9619a6

 

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Hi,

I had seen that post as well and managed to fine a way to use it for in my onLoad event and hid the help text for specific catalog items in CMS:

$('question_help_IO_e3fd786c4c0610006e779c3e4ed5a66e_toggle_value').update('');

My issue is that, that does not work on ServiceP ortal due to the fact that the help_text item being an Angular object:

<p ng-bind-html="::field.help_text" ng-if="::field.help_text" title="More information" class="help-block ng-binding ng-scope">If you are making a request on behalf of someone else, please contact the IT-Servicedesk on Ex. 4444</p>

Any thoughts there?

Bob.

 

Hi Bob,

 

Can you try to have a UI script in global scope and try this one.

 

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Bob,

Any update on this?
Can you mark my answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

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