Please annotation that every bit of the Istanbul release of ServiceNow there is a variable field setting that allows you to automatically display the assist text for a particular variable. The scripts beneath are all the same needed to selectively brandish the help text but the new field is probably the style to go if you lot're on Istanbul or later and just desire assist to always brandish for a particular variable. Click this link for more details.

Eastach Service Catalog variable in ServiceNow allows yous to provide the finish-user with some additional information almost that variable and how to use information technology. By default, these 'Help Text' sections are collapsed when the service catalog item loads. You may want to automatically expand the help text for a item variable so that it is more obvious to the user what they demand to do. Here's how you can toggle the brandish of the help text for variables in your service itemize.

Expanded Help Text

The following itemize client script will show the help text for the 'caller_id' variable automatically when the catalog item form loads.

function onLoad( ) {
var myVar = g_form.getControl ( 'caller_id' ) ;
toggleHelp(myVar.id ) ;
}

Geneva Workaround!!!
If you're an early Geneva adopter it looks like ServiceNow has a bug where they've broken 'toggleHelp' because they're not targeting the right chemical element ID within their function. Hopefully this volition become fixed but until then here's a workaround using the same example higher up…

//Geneva workaround because 'toggleHelp' is cleaved
var myVar = g_form.getControl ( 'caller_id' ) ;
var myVarHelp = $( 'question_help_IO_' + myVar.id.split ( ':' ) [ 1 ] + '_toggle' ) ;
toggleVariableHelpText(myVarHelp) ;

Annotation: At that place are some variable types (I've identified labels and multiple choice variables so far) that render an ID prefixed past 'sys_original.'. For these variables, your catalog client script will have to supersede that text in gild to work correctly. Hither'due south an example for a multiple choice variable named 'multichoice'.

function onLoad( ) {
var myVar = g_form.getControl ( 'multichoice' ) ;
toggleHelp(myVar.id.replace ( 'sys_original.' , '' ) ) ;
}

Switching aid text open or closed instead of a toggle

If yous encounter a situation where you demand to open or shut the help text automatically, but don't know what state the help text will exist in, then the 'toggleHelp' function probably won't work for yous. This is most ofttimes the example if you need to toggle the assist text based on some 'onChange' event. For those cases you tin can use the following catalog client scripts, which leverage the 'expand/collapse' effect functionality I wrote about.

Expand the help text for a variable ('caller_id')

//Expand help text for a variable
var myVar = g_form.getControl ( 'caller_id' ) ;
var wrapper = $( 'help_' + myVar.id + '_wrapper' ) ;
var image = $( 'img.help_' + myVar.id + '_wrapper' ) ;
wrapper.style.display = "cake" ;
paradigm.src = "images/filter_reveal16.gifx" ;
paradigm.alt = getMessage( "Display / Hide" ) ;
_frameChanged( ) ;

Collapse the help text for a variable ('caller_id')

//Collapse help text for a variable
var myVar = g_form.getControl ( 'caller_id' ) ;
var wrapper = $( 'help_' + myVar.id + '_wrapper' ) ;
var paradigm = $( 'img.help_' + myVar.id + '_wrapper' ) ;
wrapper.style.display = "none" ;
prototype.src = "images/filter_hide16.gifx" ;
image.alt = getMessage( "Display / Hide" ) ;
_frameChanged( ) ;

ServiceNow has inverse this…once again…in the Geneva release. Please be enlightened that these catalog client scripts are prone to suspension in future releases. I'm only providing them here for those specific cases where the business need outweighs that chance. Here are the working scripts for Geneva and across.

Aggrandize the help text for a variable ('caller_id') – GENEVA AND Across

//Expand assist text for a variable
var myVar = g_form.getControl ( 'caller_id' ).id ;
myVar = myVar.replace ( ':' , '_' ) ;
var wrapper = $( 'question_help_' + myVar + '_toggle_value' ) ;
var image = $( 'question_help_' + myVar + '_toggle' ) ;
wrapper.show ( ) ;
image.addClassName ( 'icon-vcr-down' ) ;
image.removeClassName ( 'icon-vcr-right' ) ;
_frameChanged( ) ;

Collapse the help text for a variable ('caller_id') – GENEVA AND Across

//Collapse assistance text for a variable
var myVar = g_form.getControl ( 'caller_id' ).id ;
myVar = myVar.supervene upon ( ':' , '_' ) ;
var wrapper = $( 'question_help_' + myVar + '_toggle_value' ) ;
var image = $( 'question_help_' + myVar + '_toggle' ) ;
wrapper.hide ( ) ;
prototype.addClassName ( 'icon-vcr-right' ) ;
image.removeClassName ( 'icon-vcr-down' ) ;
_frameChanged( ) ;