list deref or something else?

Hello

I have a parent / child table relationship

i'd like each child record to display a list (& link) to all the other childs that share the same parent

i'd like it to display the same way the Ref_Rows inline displays the children on the parent detail view

is it possible?

Solved Solved
0 3 84
1 ACCEPTED SOLUTION

Hello,

Yes, this is possible! What you're effectively trying to do is say "find my parent record, then get its list of children". Because your child links to the parent table via a Ref column, you can do this via a dereference. Assuming the name of the Ref-type column that links to the parent table is called [Parent ID], and assuming your parent table has the auto-generated REF_ROWS column that appears when you create a Ref-type column, you can do this via a virtual column with this expression:

[Parent ID].[Related Children]

Note that this list will include the current child. If you'd like to avoid that, you'll have to get slightly more complicated. You'll have to search all rows in the child table to find those that have the same parent as the current row, but aren't the current child. That looks like:

SELECT(Children[Row ID], AND([_THISROW].[Parent ID] = [Parent ID], [_THISROW].[Row ID] <> [Row ID]))

Hope this helps.

View solution in original post

3 REPLIES 3

Hello,

Yes, this is possible! What you're effectively trying to do is say "find my parent record, then get its list of children". Because your child links to the parent table via a Ref column, you can do this via a dereference. Assuming the name of the Ref-type column that links to the parent table is called [Parent ID], and assuming your parent table has the auto-generated REF_ROWS column that appears when you create a Ref-type column, you can do this via a virtual column with this expression:

[Parent ID].[Related Children]

Note that this list will include the current child. If you'd like to avoid that, you'll have to get slightly more complicated. You'll have to search all rows in the child table to find those that have the same parent as the current row, but aren't the current child. That looks like:

SELECT(Children[Row ID], AND([_THISROW].[Parent ID] = [Parent ID], [_THISROW].[Row ID] <> [Row ID]))

Hope this helps.

Thank you, I did have
[parent id].[related children]

in place before posting here, but it just gives me the text values for the IDs of the children 

im looking for a list similar to how the auto generated ref row column displays on the parent detail view 

Your second suggestion worked! Iโ€™m not sure what I did wrong with the first one lol, but I did prefer not to show the current child anyhow, and Iโ€™m super happy itโ€™s working!

Top Labels in this Space