Skip to content

Hierarchy Relationship

Use the hierarchy_node__sysr relationship to query the sibling ordering of hierarchy nodes on hierarchy-enabled objects. Supported objects include edl_template__v, edl__v, active_dossier_template__v, submission_metadata__v, product_report__v, active_dossier_structure__v, visual_hierarchy__v, and product_group__v.

The hierarchy_node__sysr relationship cannot be queried directly and is only available as a subquery. It is a one-to-one inbound relationship.

Access to hierarchy node data depends on the user’s permissions on the parent hierarchical record.

The following fields are available when querying the hierarchy_node__sysr relationship as a subquery.

Field NameDescription
node_id__sysThe ID of the hierarchy node (distinct from the record ID).
order__sysThe numerical position of the node among its siblings, indexed at 1.
parent_node_id__sysThe ID of the parent hierarchy node (null for root nodes).
last_modified_date__sysThe date the hierarchy node was last modified.

The following examples show hierarchy_node__sysr used as a subquery on hierarchy-enabled objects.

SELECT id, name__v,
  (SELECT node_id__sys, parent_node_id__sys, order__sys FROM hierarchy_node__sysr)
FROM edl_template__v
WHERE status__v = 'active__v'
SELECT id, name__v,
  (SELECT node_id__sys, order__sys FROM hierarchy_node__sysr)
FROM edl__v