Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Playbook - info message showing in playbook view and workspace view

JSnow2026
Giga Contributor

Hello,

 

We are using playbook in Risk workspace which has independent layouts for workspace view and playbook view. We have a requirement to add conditional info/alert message for onChange event but need to display it only on workspace view. I have created the script to limit it only for workspace view but the alert is rendering in playbook view also.

 

Can someone please advise on how to display the message only on workspace view.

 

Thank you.

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }
    var viewname = g_form.getViewName();
    //alert(viewname);
    if (viewname == "workspace") {

        //Type appropriate comment here, and begin script below
        if (newValue == 'TLM') {
            g_form.addInfoMessage("maange external parties in hirearchy tab");
        }
    }
}

 

0 REPLIES 0