Summary:
The template engine checks the WordTemplateConfig rule group for rule entries in the form table:ParentList. These entries define temporary (dynamic) parent relationships. One table can be the parent of another table if some combination of fields in the ‘child‘ table uniquely identifies a single row in the ‘parent‘ table. The format for the ParentList result value is:
ParentRelationName = ParentTableName ( parentfield1:childfield1 , pf2:cf2 , … );
Notes
- You will use ParentRelationName in PARENT(ParentRelationName) computed fields expressions
- ParentTableName is the alias name of the data on which this table depends
- ParentFieldn:ChildFieldn are the pairs of field names in the two tables. At least one pair must be specified. If :ChildField is omitted, the child field name is assumed to be the same as the parent field name.
- Should you need to define multiple parents, you can include additional parent definitions separated by semicolons.
Example:
- DocAttachedFile:ParentList has result value
ForItem = DocItem (DocItemKey:LinkedItemKey);
you then define
- DocAttachedFile.ItemStatus with result value PARENT(ForItem).ItemStatus
Remember: if you plan on using DocAttachedFile.ItemStatus in a filter, you must include
- DocAttachedFile:FieldList with result value ItemStatus;
Similarly, if a child relationships needs to be referenced, used the above syntax to create the relationship and include
table:ChildList = childtablename;
for example
- DocItem:ChildList = DocAttachedFile;
Additional Comments:
Spitfire includes several predefined parent-child relationships, such as between DocItemTask and DocItem.See KBA-01323 for an overview of the WordTemplateConfig rule.
KBA-01437; Last updated: October 20, 2016 at 13:32 pm;
Keywords: dynamic relationship;temporary parent relationships;parent child;