Get Record IDs from Report Link
I have three tables Templates, Template_Events & Template_SubEvents. Templates has a relationship with Template_Events, Template_Events has a relationship with Template_SubEvents, and Template_SubEvents has two self-identifying relationships (this allows for different Template_SubEvents to be selected in two places on the form). What I'm needing to do is prevent a circular dependency in the Template_SubEvents table. What I've come up with is using a Text field (Hierarchy List) to store the Child record(s) ID and the Child records of its Parent.
For example:
If I have Record IDs of 1, 2, 3 & 4. 2 is a Child of 1. 3 is a Child 1. 1 is a Child of 4. In the Hierarchy List for ID# 4 would be "1,2,3". In the Hierarchy List for ID# 1 would be "2,3". So ID# 4 wouldn't be able to be the Child of the records 1, 2 or 3. A formula field would compare the contents of Hierarchy List field to the selection made in the Parent_SubEvent ID field and then a Dynamic Form Rule would display a message if the formula equaled 'Y'.
I'm attempting to get the Child Records from a Report Link but that is proving difficult. I have the current formula
ToText(GetFieldValues(GetRecords("{228.GT.0}", "bt6eizk88"), 178))
but it's displaying the same values for ALL records. fID '228' is a summary field that counts the number of Child records. fID '178' is one of the Report Link fields.
Am I on the right track for something like this or is there a better way to prevent a circular dependency? I thought about creating another table and storing Child, Parent and Grand-Parent ID but got feedback to try and make the Hierarchy List field work.