P() and E() functions 

The P() and E()functions refer to what is Possible and Excluded respectively. These functions are used in the set modifier expression. The field to the left of the arithmetic comparison will be assigned with all the possible or excluded values to the right of the field used in the P() or E() functions. To understand these functions better, let's consider the following example. The next table consists of three columns: Product Id, Product Status Id, and Product Status Description.

Product Id Product Status Id Product Status Description
1

1

Active
2 1 Active
3 2 On Hold
4 3 Inactive
5 3 Inactive
6 3 Inactive

 

The following screenshot shows the Product Id selection of 1, 2, and 3:

Let's recap on the QIX colors: green for user selections, white for possible values, and gray for excluded values. 

Now let's consider the following expression using the P() function:

count({$< [Product Id] = P([Product Status Id]) >} [Product Id])

This would count the Product Id for all possible values of Product Status Id. In this example, the possible values of the field Product Status Id are represented by white, that is to say, 1 and 2.

The result is 2 as the possible values of Product Status Id after the selections are 1 and 2.

Now let's consider the following expression with the E() function:

count({$< [Product Id] = E([Product Status Id]) >} [Product Id])

The excluded value of Product Status Id is 3 - dark gray - so Product Id would get a value of 1 resulting in 1 as the result of the expression.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.91.24