IsTrueForAllChildren
Evaluates the childPredicateExpression for each object instance related to (child of) a parent object and returns true only if the childPredicateExpression returns true for all children.
Syntax
IsTrueForAllChildren(parentObjectName, recId, childRelationshipRef, childPredicateExpression)
Enabled for
Search/Dashboard | Yes |
Business Rules | Yes |
Quick Actions | Yes |
Workflow Objects | Yes |
Reports | No |
Parameters
parentObjectName | The name of the parent business object. |
recId | The RecId of the parent business object. |
childRelationshipRef | The name of the child business object, including the relationship tag. |
childPredicateExpression |
The Boolean child search expression. Evaluates all child business objects for the condition. |
Return Value
Boolean value. Returns true if all child business objects satisfy the condition defined by the childPredicateExpression parameter; otherwise, returns false.
Example
Use the following example to check if an incident has any open tasks:
$((Status != "Closed" && Status != "Resolved") || IsTrueForAllChildren("Incident#", RecId, "Task#Assignment.Rev3", "$(Status == 'Completed' || Status == 'Cancelled')"))