Exists Expression

UDP ›› Rule Conditions ››
Parent Previous Next

EXISTS Expression

The EXISTS Expression is used in the conditional part of a rule (see Rule Condition) to check whether there are any instances of the specified business object (or business object group) in the system, for example,

   

If EXISTS Account Then …  

   

The expression may also check if only instances that match a particular condition exist in the system. The condition may be indicated using the WHERE keyword and must be enclosed in brackets, for example:

   

EXISTS Account WHERE (Account.State = 'OPEN')   

   

The above expression checks whether there are open accounts in the system. The condition that follows the WHERE keyword may have one or more expressions connected with AND or OR keywords – just like the conditional part of a rule ((see Rule Condition), for example:  

   

EXISTS Account WHERE (Account.State = 'OPEN' AND Account.Balance > 100)   

   

  NOTE:  The expression checks all instances of the specified business object that exist in the system’s database, not in the current Context