---
sourceDocument: Australia ServiceNow AI Platform Administration
sourceDocumentLink: https://www.servicenow.com/docs/r/platform-administration

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Advanced conditions

# Advanced conditions for email notifications {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Use an advanced condition to send a notification based on the current email record,
changing field values, or system properties.  
To send a notification using an advanced condition, you can:

* Call a function that returns a value, or
* Set the global variable `answer` using a script
{#c_OptSpecifyingAdvancedCond__ul_mbq_qhq_g3b}  
For example, in the following code, you call a function to prevent the system from sending an email notification if the sender of a self-service request is a member of the XYZ group:

    (function() {
      var groupMember = gs.getUser();
      return !groupMember.isMemberOf('XYZ');
    })();

Alternatively, you can script the same advanced condition by using the `answer`
variable:  


    var groupMember = gs.getUser();
      if(groupMember.isMemberOf('XYZ')){
        answer = false;
      } else {
        answer = true;
      };

Note that the script must set the `answer` variable to
true to send the notification. If you script no conditionals, the
value of `answer` is equal to the last value that you set for the variable.

You can add a script-based condition in the Advanced condition field by
configuring the Email Notification form and adding the field. You can access the field in the
Advanced view without configuring the form.  
The advanced condition script uses the following business rule global variables:

* current: contains the current record from the table to which the notification is linked.
* event: contains the event that triggered the notification.

{#c_OptSpecifyingAdvancedCond__ul_ujt_swp_54}  
Note:  
The Advanced condition field is evaluated in addition to other conditions you set on the notification. Both the Condition and Advanced condition must evaluate to true in order to send the notification.
**Related tasks**   

* [Create an email notification](https://www.servicenow.com/docs/vaPuVLOcN_zPS8jyrTPDmw "Create an email notification specifying when to send it, who receives it, what it contains, and if it can be delivered in an email digest.")

