Kent Searight Posted June 16, 2008 Posted June 16, 2008 Hi all, I'm trying to figure out a way of doing this without having to resort to a script. Maybe it can't be done. If a child has a parent, and that parent has another child, then that other child is a sibling of the first child. How do I get a portal to show siblings of a child in a layout based on a child's TO that shows siblings, but not the child of the current record? I've tried a couple of different relationship structures and tried using multi-valued keys, but nothing has worked. I can't get the child of the record to not show up as a sibling to himself/herself in the portal without using a script to set a key in the parent table. Thanks in advance! -Kent
comment Posted June 16, 2008 Posted June 16, 2008 This is not very clear*, but I think you want a self-join relationship of the Child table where: Child::ParentID = Child 2::ParentID AND Child::ChildID ≠ Child 2::ChildID --- (*) If you are on a layout of the Child table, how is a key in the Parent table relevant?
Kent Searight Posted June 16, 2008 Author Posted June 16, 2008 Hi Michael, One important part I left out is that a child can have 2 parents.
comment Posted June 16, 2008 Posted June 16, 2008 Please explain your parent-child structure. How does a child have two parents - are there two ParentID fields in the Child table? And what is a "sibling" in this context? Is a half-brother a sibling?
Kent Searight Posted June 16, 2008 Author Posted June 16, 2008 (edited) Oops. Your question made me realize the error of my ways. I was insisting on using the Parent table to try to join siblings, instead of using a self join. Attached is the file that solves it with a self-join using the same basic structure that's in a solution I'm developing. Here's another question for you. I'd originally intended on joining children to parents via a join table so that a child could have any number of parents. How could I accomplish showing siblings in the way I want to if a join table is between parents and children? Thanks! -Kent BTW To answer your question, a sibling for this purpose only needs to share one common parent ParentChild.fp7.zip Edited June 16, 2008 by Guest Clarification
comment Posted June 16, 2008 Posted June 16, 2008 How could I accomplish showing siblings in the way I want to if a join table is between parents and children? You would do the self-join on the join table instead (parent = parent and child ≠ child). Then attach another TO of Child to the second TO of the join table.
Kent Searight Posted June 16, 2008 Author Posted June 16, 2008 :doah: I knew I was making this way harder than was necessary. Thanks for your help, Michael! -Kent
Recommended Posts
This topic is 6063 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now