Forum Discussion

michaelmalchiod's avatar
michaelmalchiod
Qrew Member
3 years ago

Parent Child Relationship via one table

Hello I am rather new to Quickbase.

I anticipate developing a table where users enter our customer company information into.  I plan on having a field to designate if the customer company is a parent or a child company.  This will be a True False field.  True indicates a child company and False indicates a parent company.  To designate what parent/company the child/company rolls up to I am thinking of a drop down field which pulls the distinct values of this table (where the roll up designation is false(Parents))  Thus I plan on using one table for parent and the child and designate between parent and child by this field.  

Reason for not using classic parent child relationship(two tables)

If I use the classic parent child relationship I would have two tables and in most cases the parent information would be exactly the same as the child.  Fully 95% of our customers do not rollup into another company.  I am thinking in this situation the users would have to create a parent company for every child when they are exactly the same in order for this to work(duplicating the data entry).  

Is there a better way to do this?  In addition I am trying to avoid pipeline logic.

------------------------------
michael malchiodi
------------------------------

2 Replies

  • Can you give an example?

    Are you saying your table is say, 'Customer Information.' Perhaps the Customer is Bob's T-Shirts.

    Bob's T-shirts may be a parent to another company in your system, and maybe a child to another customer in your system and you want to acknowledge this?

    ------------------------------
    Mike Tamoush
    ------------------------------
    • michaelmalchiod's avatar
      michaelmalchiod
      Qrew Member
      Hi Mike 
      Thank you for responding.

      Essentially when there is a N in the Has Parent it really is a Parent Customer.

      Table Customer                                       Has Parent                           Related Parent Name
      Vito Deli                                                    N
      Subway Hartford CT                               Y                                            Subway Master Company    
      Subway Master Company                      N            

      Thus on the customer form.  I have a text field which lookup of the customer table.  The problem I am facing is that I have not been able to figure out how to limit that text field lookup to only pull those records where Has Parent is N.  I need this or the users will be choosing Children as the Parent.

      I am trying to keep the user from having to enter Vitos Deli and all the information into the a parent table and a child table to keep the relationship valid.  I could just have them do this but it will be an issue.

      ------------------------------
      michael malchiodi
      ------------------------------