The Zurich release has arrived! Interested in new features and functionalities? Click here for more

how to display alert message when filed value changes

Govardhan
Kilo Contributor

hi All

i am trying to display an alert message in incident form ,i have configuration item filed when user selects "redbird"option in configuration item filed .i have to pop up a alert message ..saying that "you have selected "redbird as your choice".can any one help ...?

12 REPLIES 12

Sanjeev Kumar1
Kilo Sage

Hi,


Write on change client script on that field. you can use alert OR


g form method (http://wiki.servicenow.com/index.php?title=GlideForm_%28g_form%29#addInfoMessage&gsc.tab=0   )


can you help me with the code pls..i am new to servicenow


Pradeep J
Kilo Guru

Hi



Write a onChange () Client script on Configuration Item field



Script:


function onChange(control, oldValue, newValue, isLoading, isTemplate) {


    if (isLoading || newValue === '') {


          return;


    }




    //Type appropriate comment here, and begin script below


    var ci=g_form.getDisplayBox('cmdb_ci').value;


  alert("Selected CI is= "+ci);


}



CI pop up.PNG




Thanks


Pradeep D J


PS - Please mark Helpful, Like, or Correct Answer if applicable.