How to show help text for a check box variable?

Mike Beardsley
Mega Contributor

I'm having an issue with getting help text to work on check box variables. Out of box there is a UI policy that is hiding the Show help (show_help) check box on the variable record. I updated that UI policy so I can check the Show help box to turn help text on. However, it still is not displaying my help text at all. I did some more research in the ServiceNow docs and the only information I could find is that help text is not available for check boxes and containers. Does anyone know why that is? And if there's a way I can do it anyways even though it's not out of box? I want to utilize HTML in the help text to display an image. I'm on Geneva. checkbox_variable.jpg

Thanks for the help in advance!

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

Looks like it is not supported for checkbox.



But you can always write onLoad scripts with show field message



g_form.showFieldMsg('field_name','Your help text','info');



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

6 REPLIES 6

will_smith
Mega Guru

If you put a label variable right before your textbox you can a "header effect" for your checkboxes. This won't allow you to show an image, but you could try to put an HTML variable instead of a label and see what that gets you.



Checkbox without label before


Checkboxes without label.png



Checkbox with label before


Checkbox with label.png


SanjivMeher
Kilo Patron
Kilo Patron

Looks like it is not supported for checkbox.



But you can always write onLoad scripts with show field message



g_form.showFieldMsg('field_name','Your help text','info');



Please mark this response as correct or helpful if it assisted you with your question.

Harsh Vardhan
Giga Patron

Hi Michael,



i would suggest you to add label type variable and there you can define your message related to check box.


or you can also use "tool tip" when ever user will hover the mouse on check box variable then it will display some message. but in this case your help information should not be long.



Thanks,


Harshvardhan


HugoFirst
Kilo Sage

Michael,


Are you looking to do something like this?:


find_real_file.png



If so, here's the script in an onload catalog client script that does the trick for me:


(be sure to change the variable names in the array to match yours, and then adjust the number in the for loop to match the number of variables in your array)


// Ref: http://www.servicenowguru.com/scripting/client-scripts-scripting/showhide-service-catalog-variable-h...
// This script follows a recommendation to expand help which bypasses the Geneva bug in toggleHelp.

function onLoad() {


var MyVars=new Array("start_date", "external_references", "firewall_source", "firewall_destination",
"firewall_destination_ip_ports", "firewall_special_issues", "exception_type");


for (i=0; i<=6; i++)
{
var ThisVar = MyVars[i];
var myVar = g_form.getControl(ThisVar);
var myVarHelp = $('question_help_IO_' + myVar.id.split(':')[1] + '_toggle');
toggleVariableHelpText(myVarHelp);
}
}