Forum Discussion

ChristineKirk's avatar
ChristineKirk
Qrew Cadet
13 days ago

Back to basics: Pulling info from a grand-parent table

Hello!

Just doing some maintenance and preparing for some overhauls. In one area, I'd like to streamline pulling in info and linking to a grand-parent table (is that what you'd refer to it as?), by pulling info just from the Child table. In this specific instance, it is:

  • Parent: Organization
  • Child: Contact Person
  • Grandchild: Activity Record

On the Activity Record, I'd like to look up the Child Contact, and auto-populate AND link to the Organization.

I can't remember how to do that! Right now - I have both Organization and Contact Person set up with a direct relationship to the Activity Record, just so when I pull up the Organization, it properly links. 

5 Replies

  • Christine.  To echo previous comments, to get information down the hierarchy, you just successively lookup field down and down one level at a time.  Do not try to skip levels.  same form summary fields, sumamrize up one level at a time, up and up and up.

     

    BUT note that if you want to have an embedde report of say Grand children on a Grandparent form, no problem at all.  Just make a report link field on your Grandparent Record which is configured with the Key field of the Grandparent table on the Left side and then ensure that field got looked up down and down to the grand child and I suggest named like [Record ID# of Grandparent] and then use that report link field either as a stand alone form element on the Legacy Style form or as a filter on the new style forms.

    The key takeaway here is that you do not need to have a relationship to have a report Link Field. Just create one and it can match up any field on a record with any other field on any table in your app or in fact even cross apps to any Table in your Realm.

  • In general, you can use lookup fields as you go from Grandparent to child (I kind of wish they were called lookdown fields, as they travel down the lineage...).

    Then you can use summary fields to go to the reverse and go up the lineage. You can always summarize summary fields....just remember you may end up with a long text string by the time you get back to the Great Grandparent.

    So if you want a community organization to show up on your Activity Table, lookup the field from Organization to Emergency Department to customer to Activity.

    And conversely if you want all Activity info up on your organization, take a summary from Activity up to Contact....then another summary and another summary. In the end you will end up with string separated by semi colons. You can use SearchandReplace to change it into something more pleasing for the user to look at (perhaps line breaks etc).

  • Christine.  

    In reading your "2nd" comment though, I think what you might be asking for is for the User to leverage Conditional Relationships to select the GC based on the entry of a GC Activity which is connected to the GGC (Community Organizations).  So therefore, by knowing the GGC (Community Organization), you can also provide the User the correct drop-downs of Emergency Departments (GCs) to choose from.

     

  • Updating my request - I wish there were a way to edit the main post :).

    I think part of my problem may be rooted in the fact that I have actually a GREAT-Grandparent here. I simplified what was written above, and am now exploring this a little more. Here's what I have, and ultimately, I want to pull the Grandchild to the Grandparent

    GGP: Community Organizations

    * GP: Emergency Departments

    C: Contact

    * GC: Activity

     

    I don't have a relationship built as I thought I had, between GP and GC. I have the relationship between GGP and GC. 

    Going to work on this and see if what i need to do is build a summary field. But ultimately I'd like the grandchild records to roll up tot he Grandparent, and display on the form (I did achieve this ages ago through whatever workaround I made), and also, eliminate the end user's need to manually enter in the GP. Ideally, they should look up the Parent contact, and be done.

  • Thanks, Mike!

    I'm not looking for a summary (or, at least I don't think?). I'd like to connect Grandparent to Grandchild and populate the report of records on the Grandparent form -- but with the only "connector" being that on the go-between Child, that connects the two. Is that possible?

    What we have now is, my staff have to manually enter the Contact, AND the Emergency Room (or Community Organization). I'd like it to infer that when my staff pick the Contact, which is tethered to the appropriate parent or grandparent.