ILOG Rules for .NET User Guides > ILOG Rule Solutions for Office > Writing and editing rules > Define variables and constants > Use conditions to restrict variables

You can use where in the Definitions part to apply further restrictions on the variables that you declare. For example, you could restrict the variable so that it can only be set to valued customers as follows:

 Definitions
     set 'loyal customer' to a customer where the category of this customer is Gold;
 If
     the value of the shopping cart of 'loyal customer' is more than $200
 Then
     Apply the super discount;

Another example shows how to declare the a senior Gold customer variable, initialized to a customer who is a Gold member and at least 65 years old.

 Definitions 
   set 'senior Gold customer' to a customer
       where all the following conditions are true:
           - the category of this customer is Gold
           - the age of this customer is at least 65;

See Also

definitions

set <variable> to <definition>

where <test>