IN Expression
The IN Expression is used in the conditional part of a rule (see Rule Condition) to check whether the value of a particular attribute of a business object , business object group or notification is equal to one of the specified values in the provided list. For example,
- Account.State IN 'Open', 'Closed'
- Account.Balance IN 1000, 2000, 3000
As seen from the examples above, values in the list must be separated by a comma symbol. There is no limit on a number of entries in the list.
The IN Expression may also check whether an instance of a business object is in the list of references of another object. This form of the IN expression is typically used inside the condition that follows the “WHERE” keyword (see EXISTS Expression). For example,
EXISTS Account WHERE (Transaction IN Account.Transactions AND Account.State = 'Open')
The above expression checks whether there is an open account in the system that contains a particular transaction (the instance of a Transaction must be in the Context).
NOTE: It is possible to use a special expression LOGGED_IN_USERS instead of the list of references. This will check if the specified user is logged in, for example:
FIND SystemUser WHERE SystemUser.LoginName=’john’
IF SystemUser IN LOGGED_IN_USERS Then
DISPLAY MESSAGE ‘John is logged in’