Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to add HINT

nameisnani
Mega Sage

We have requirement on change table . 

 

We have add new field called ' Backout Options ' under Planning section .

 

The field should be display right after 'BackOut Plan '.

 

Field should be select Box . 

 

Field Name :- Backout Options 

 

Below are options to be displayed 

Tested Backout - (This specific change has been implement in NonProd or Prod and backed out successfully )
Untested Backout - (Back Out procedure is documented and available but has not been tested)
No Back Out - (This change cannot be backed out.)

 

NOTE - Based on the options selected Which are brackets those texts are HINT .

 

I have created the new field 

nameisnani_0-1717578937620.png

 

But how to add HINT text based on the options selected .

 

Please prvoide steps and screenshot for better understanding .

11 REPLIES 11

nameisnani
Mega Sage

Hi @Sohail Khilji 

 

Could you please provide me the complete script please.

@nameisnani 

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }

    if (newValue == 'Tested Backout') {
        g_form.ShowFieldMessage('u_backout_options', 'This specific change has been implement in NonProd or Prod and backed out successfully', 'info');

    } else if (newValue == 'Untested Backout') {
        g_form.ShowFieldMessage('u_backout_options', 'Back Out procedure is documented and available but has not been tested', 'info');
    } else if (newValue == 'No Back Out') {
        g_form.ShowFieldMessage('u_backout_options', 'This change cannot be backed out', 'info');
    }


}

☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect