Opening/Closing "More Information" field from code

cgedney
Giga Guru

My Business Unit wants the "More Information" to open when a selection is made on another field and replace the text within the More Information with an alternate text, depending on what is selected. Is that possible to do from a client script?

The scenario is: 

I have a catalog item with a select box. When the user selects say A, they want the more information on another field to open with different text then what was in there when the form was opened. When the user selects any of the other selections, they want it to stay/go back to the original text and the more information can close.

2024-03-22 14_27_07-Testing More Information _ ServiceNow.png

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

   //if newValue is A, then set new text in More info and open it
   if (newValue == 'A') {
      //somehow change the more info text and open it
   }
   else {
      //set the more info text back to original text and close it
   }   
}

Is this possible???

 

Thank you, 
Charles

 

1 ACCEPTED SOLUTION
1 REPLY 1

SunilKumar_P
Giga Sage