Creating a Filter Using an EKL Script

In a Knowledge Report, you can create a filter applied to a type using an EKL script.


Before you begin: You must have selected a type.
See Also
Defining a Knowledge Report
Managing Attributes
  1. In the Object Filter section, select your type and click Create Filter.
  2. Click Create/Edit Expression to create the EKL script.
  3. Enter your script.
    Important: The Argument List section contains two arguments:
    • ThisObject is an input parameter whose type is identical to the one you selected.
    • ReturnBool is an output parameter of Boolean type. Remember to set the ReturnBool Boolean in the script:
      • True, the current object of the selected type is kept.
      • False, the current object of the selected type is excluded.
  4. Click OK.

Script Example

The script below returns True for red objects and for those whose parent has at least two children. It returns False in all other cases.

ReturnBool = False

let Parent(BodyFeature)
set Parent = ThisObject.Owner

let ParentChildList(List)
set ParentChildList = Parent.Children

if(ThisObject.Color == "red")
     ReturnBool = True
else if(ParentChildList.Size() >= 2)
	ReturnBool = True
else
	ReturnBool = False