When writing conditions, be careful with using the right JavaScript operators. Since the Condition field is a short line, the code can get quite compressed. If you have a very complex condition, consider the following:
- Split one Business Rule into many. This is always good practice anyway. Instead of having lots of OR conditions and writing one big Business Rule, have several, more targeted Business Rules with smaller conditions.
- Put the most important statements in the Condition field and place the rest in an if block in the Script field.
- Write a function and call it from the condition (the ideal place to store the function is in a Script Include, described later in this chapter).
- Expand the Condition field. It is ...