Writing Valid Expressions

Embedded if statements, else / else if, (), and or clauses are not supported at this time. However, you may write statements in a way that achieves your purpose. For example, a statement such as:

if (AREA = 'Customer Support') {
  if (STATUS='Submitted') {
    SUB_STATUS = 'Needs Review'; 
    OWNER = ASSIGNED_TO;
    DUE_BY_DATE = SYSDAY;
  }
} else if (AREA = 'Bugs') {
  STATUS = 'New';
} else {
  STATUS = 'Unassigned';
}

IS NOT SUPPORTED

It should, and must be, written as:

if (AREA='Customer Support' && STATUS='Submitted') {
  SUB_STATUS='Needs Review'; 
  OWNER=ASSIGNED_TO;
  DUE_BY_DATE = SYSDAY;
}
if (AREA = 'Bugs') {
  STATUS = 'New';
}
if (AREA != 'Customer Support' && STATUS != 'Submitted' && AREA !='Bugs') {
  STATUS = 'Unassigned';
}

Within the onchange directive, it is important to consider the change events. There are three of these, changed, changed from and changed to. You may only have one of these qualifiers in a statement. For example, the following rule will work:

if (CATEGORY.{changed to:"Software"} && PRIORITY = "P 1")
  { IMPORTANCE = "High" }

whereas the following will not work:

if (CATEGORY.{changed to:"Software"} && PRIORITY.{changed})
  { IMPORTANCE = "High" }

The reason is that a user implicitly only changes one item on the user interface at one moment. The rule will never trigger the change if it looks for two or more changes at the same moment.