SelectAction

ContextActions. SelectAction

An action "select" that selects a number of concepts of the given type, optionally filtered by a where condition
Options:
  • concept: The concept to select
  • property: Select the concepts this property holds
  • target: The specific uuid to select
  • as: The variable name to save the selection as
  • where: A filter spec for filtering on the selection
  • forEach (false): If true the select action is run 1 time for each currently selected concept
  • stopIfEmpty (false): If true, the action chain stops if nothing is selected

Constructor

new SelectAction()

Source:
Examples
//Select all concepts of a type
{
    "select": {
        "concept": "myConceptType"
    }
}
//Select all concepts of a type, and save the selected uuids in the variable $mySelection
{
    "select": {
        "concept": "myConceptType",
        "as": "mySelection"
    }
}
//Select all concepts of a type (Shorthand version)
{
    "select": "myConceptType"
}
//Select concept with given uuid
{
    "select": {
        "target": "someuuid"  //Can also be an array: "target": ["uuid1", "uuid2"]
    }
}
//Select concept saved in variable, shorthand
{
    "select": "$myConceptVariable"
}
//Select all concepts of a type, filtering for some property. (Also supports "or", "and" and "not" inside the where clause)
{
    "select": {
        "concept": "myConceptType",
        "where": {
            "property": "color",
            "equals": "yellow"
        }
    }
}
//Select all concepts of a type, filtering using a calculation
{
    "select": {
        "concept": "myConceptType",
        "where": {
            "calculate": "$myConceptType.myProperty$ + 10",
            "equals": "15"
        }
    }
}
//Select all concepts of a type, filtering using lastTarget (only available in forEach)
{
    "select": {
        "concept": "myConceptType",
        "where": {
            "property": "myConceptType.uuid",
            "equals": "lastTarget.uuid$"
        },
        "forEach": true
    }
}