Calculating and Storing the Parent of a Node

You can define an expression to calculate a parent and then store that value for each request action where the parent is unknown.

For hierarchy viewpoints only, you can calculate and store the value of the CoreStats.Parent property when adding or inserting a node during these operations:

  • Loading a request file when the parent is undefined
  • Creating request items from compare differences when the source parent is undefined (when the source viewpoint is a list and the target is a hierarchy)
  • Generating subscription request items when the source parent is undefined (when the source viewpoint is a list and the target is a hierarchy)

Considerations

  • When creating the expression to calculate the parent, you can select from these fields for the node object in the expression builder:

    • dimension
    • name
    • nodeType
    • properties (Node properties only. Relationship properties are not available when calculating the parent.)

    See Using Expressions to Define Custom Business Logic.

  • The expression for the calculated parent must refer to an existing node in the target viewpoint. You cannot define an expression to create a parent node.
  • When creating request load files, use the <Unknown> keyword in the parent column of a request load file (where an expression is configured for the CoreStats.Parent property) to calculate the value for that parent. Leaving a blank in the parent column will cause the node to become a top node.
  • For requests generated from compare differences and subscriptions, when request actions are created for a node in a target viewpoint which has the CoreStats.Parent property and the parent is unknown, the system uses the <Unknown> keyword in the parent column of the generated request file attachment to indicate that the value for the parent should be calculated.
  • The node type of the calculated parent is calculated as follows:
    • If only one node type in the hierarchy set allows children, that node type is used for the parent.
    • If more than one node type in the hierarchy set allows children, those node types are searched for a node with the same name as the calculated parent:
      • If a node with the same name as the calculated parent is found in only one of those node types, that node type is used.
      • Otherwise, the node type of the child node is used for the calculated parent.