Skip to main content
Skip table of contents

Complex Copy Field to Ancestors/Descendants

Complex Copy Field to Ancestors

The Complex Copy Field to Ancestors macro propagates a single field from all complex records of a given __Type upwards to the ancestors of those records. This macro and its companion Complex Copy Field To Descendants let you manipulate entire nested, hierarchical, or tree record structures, and filter records depending on where they are in the tree. 

Complex Copy Field to Ancestors macro configuration parameters

The Complex Copy Field to Ancestors macro has a single set of configuration parameters:

Type of parent record

Value of the  __Type field of the parent records you want to copy. Default: None.

Field to copy

Name of field to copy. Default: None.

Field name on output

Name of copied field on output. Default: None.

Configure the Complex Copy Field to Ancestors macro

  1. Select the Complex Copy Field to Ancestors icon, and then select the Configuration tab on the Properties pane.

  2. Select Type of parent record box and enter the value of the __Type field of the parent records you want to copy. (A parent record is a record that is higher in the tree as defined by the __ID and __ParentID fields.)

  3. Select which Field to copy, and specify the Field name on output.

  4. Optionally, go to the Execution tab, and then set Web service options.

Complex Copy Field to Descendants

For each record of the named type, the Complex Copy Field to Descendants macro copies the specified field (usually __ID or __ParentID, but it can be others) from each selected record to all of its descendants in the linkage hierarchy. This is useful if you want to find all records that belong underneath records of a given type so that the entire subtree can be manipulated at once. For example, suppose you propagate the __ID value from ancestors of type "100" down to a new field __Ancestor100ID in all descendants. Now you can query all records with a question like "are you a descendent of the type-100 record whose ID is 15"?  This can support higher-level operations like tree splitting and re-balancing.

Complex Copy Field to Descendants macro configuration parameters

The Complex Copy Field to Descendants macro has a single set of configuration parameters:

Type of parent record

Value of the  __Type field of the parent records you want to copy. Default: None.

Field to copy

Name of field to copy. Default: None.

Field name on output

Name of copied field on output. Default: None.

Configure the Complex Copy Field to Descendants macro

  1. Select the Complex Copy Field to Descendants icon, and then select the Configuration tab on the Properties pane.

  2. Select Type of parent record box and enter the value of the __Type field of the parent records you want to copy. (A parent record is a record that is higher in the tree as defined by the __ID and __ParentID fields.)

  3. Select which Field to copy, and specify the Field name on output.

  4. Optionally, go to the Execution tab, and then set Web service options.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.