- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 08:56 AM
Hello,
I am trying to show / hide help text based on a UI policy evaluating true or not the UI policy is evaluated based on relative date selected.
Everything I have tried script wise fails to actually control the help text field. Ideally I want it hidden entirely and shown only if the condition evaluates to true.
I have tried the suggestions on ServiceNow Guru but they do not seem to work with my variable defined.
var myVar = g_form.getControl('new_hire_start_date');
var myVarHelp = $('question_help_IO_' + myVar.id.split(':')[1] + '_toggle');
toggleVariableHelpText(myVarHelp);
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 09:25 AM
I don't think you can do this with a UI Policy. You could use a client script and make sure isolate script is unchecked. This may not be on the form. If isolate script is checked (witch it is by default) then certain code will not run.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 09:25 AM
I don't think you can do this with a UI Policy. You could use a client script and make sure isolate script is unchecked. This may not be on the form. If isolate script is checked (witch it is by default) then certain code will not run.