FilterAction

ContextActions. FilterAction

An action "where" that filters on the currently selected concepts If the option "stopIfEmpty" is set to true, the action chain will terminate after the where action, if no concepts survived the filtering.

Available operators for property/variable/value filter:

  • "equals" - "number", "boolean", "string", "concept"
  • "unequals" - "number", "boolean", "string", "concept"
  • "greaterThan" - "number", "string"
  • "lessThan" - "number", "string"
  • "greaterOrEquals" - "number", "string"
  • "lessOrEquals" - "number", "string"
  • "startsWith" - "string"
  • "endsWith" - "string"
  • "includes" - "string", "array"
  • "matches" - "string"

Constructor

new FilterAction()

Source:
Example
{
    "where": {
        "or": [
            {
                "calculate": "10 + $myVariable$",
                "equals": 15
            },
            {
                "not": {
                    "variable": "myVariableName",
                    "equals": "myVariableValue"
                }
            },
            {
                "not": {
                    "property": "myProperty",
                    "equals": "myPropertyValue"
                }
            },
            {
                "and": [
                    {
                        "property": "myOtherProperty",
                        "unequals": "somethingelse"
                    },
                    {
                        "property": "myThirdProperty",
                        "lowerThan": 10
                    }
                ]
            }
        ]
    }
}