Hide label section

Rafael Batistot
Tera Sage

Hi team

I have this situation here. I would like to create a rule or script that if "Model" contains "5875" the section "Mobile" as selected get not visible 

RafaelBatistot_0-1742343029504.png
Thank's  in advanced

 

2 ACCEPTED SOLUTIONS

Hemant Ch
Tera Expert

Hi

 

Write a ServiceNow on change client script on the model field 

-Make onchange to work onload also 

 

 var modelValue = g_form.getValue('model');
        if (modelValue.includes('5875')) {
            gForm.setSectionDisplay('mobile', false);
        } else {
            gForm.setSectionDisplay('mobile', true);
        }
    }

 

Ch Hemant Kumar

Lead -Ciena

 

View solution in original post

Rafael Batistot
Tera Sage

It's works dude!!. Thank you

View solution in original post

2 REPLIES 2

Hemant Ch
Tera Expert

Hi

 

Write a ServiceNow on change client script on the model field 

-Make onchange to work onload also 

 

 var modelValue = g_form.getValue('model');
        if (modelValue.includes('5875')) {
            gForm.setSectionDisplay('mobile', false);
        } else {
            gForm.setSectionDisplay('mobile', true);
        }
    }

 

Ch Hemant Kumar

Lead -Ciena

 

Rafael Batistot
Tera Sage

It's works dude!!. Thank you