# Set modifiers with implicit field value definitions

The following describes how to define a set of field values using a nested set definition.

In such cases, the element functions P() and E() must be used, representing the element set of possible values and the excluded values of a field, respectively. Inside the brackets, it is possible to specify one set expression and one field, for example `P({1} Customer)`. These functions cannot be used in other expressions:

Examples:

Examples and results

| Example | Result |
| --- | --- |
| sum( {$&lt;Customer = P({1&lt;Product={‘Shoe’}&gt;} Customer)&gt;} Sales ) | Returns the sales for current selection, but only those customers that ever have bought the product ‘Shoe’. The element function P( ) here returns a list of possible customers; those that are implied by the selection ‘Shoe’ in the field Product. |
| sum( {$&lt;Customer = P({1&lt;Product={‘Shoe’}&gt;})&gt;} Sales ) | Same as above. If the field in the element function is omitted, the function will return the possible values of the field specified in the outer assignment. |
| sum( {$&lt;Customer = P({1&lt;Product={‘Shoe’}&gt;} Supplier)&gt;} Sales ) | Returns the sales for current selection, but only those customers that ever have supplied the product ‘Shoe’. The element function P( ) here returns a list of possible suppliers; those that are implied by the selection ‘Shoe’ in the field Product. The list of suppliers is then used as a selection in the field Customer. |
| sum( {$&lt;Customer = E({1&lt;Product={‘Shoe’}&gt;})&gt;} Sales ) | Returns the sales for current selection, but only those customers that never bought the product ‘Shoe’. The element function E( ) here returns the list of excluded customers; those that are excluded by the selection ‘Shoe’ in the field Product. |