web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
Power Apps - Microsoft Dataverse
Answered

Dataverse: query data further than 1 parent table away (Lookup to Grandparent, etc.)

Like (0) ShareShare
ReportReport
Posted on 5 Sep 2023 06:50:10 by 62

In Dataverse how can we query data from a table that is further than 1 table away?

Lookup works well to query data 1 table away (parent table).

What is the solution to go further up this chain (Child --> Parent --> Grandparent --> Great-Grandparent --> .. --> Great..Great-Grandparent)

 

Ex: Populate the ship-to address in the invoice header, if we have table relationships looking like that:

[Invoice Header] --N:1--> [Customer] --1:N (reduce to 1:1: get ship-to contact)--> [Contact] --N:1--> [Address]

 

 

I was initially thinking about using Power-Automate, but the field needs to be updated instantly and dynamically (ex: changing the default customer ship-to to another contact) when the user populates the form and not after it's saved.

Also, if possible, I want to avoid mapping the parent field to the child table, which seems pretty heavy to implement, maintain, and operate. 

 

It seems like a pretty basic requirement, but I haven't found a solution for it yet. I would appreciate any advice on the best way to implement this behavior in Dataverse. 

 

Cheers,

Categories:
  • Verified answer
    Fubar Profile Picture
    8,032 Super User 2025 Season 2 on 05 Sep 2023 at 23:02:49
    Re: Dataverse: query data further than 1 parent table away (Lookup to Grandparent, etc.)

    Plugins and Workflows are considered internal calls and do not count towards API counts (but Power automate Flows do)

    Plugins and Workflows can be set to be either synchronous (real-time) or asynchronous (background). Flow for Dataverse is currently only asynchronous.  Configuration is generally better than custom code, so where appropriate use Workflows or Flow and do Plugins where the logic is beyond what Workflows or Flow (e.g. if you need to compare a value pre and post update operation etc)

     

    A very complex system may end up with several hundred plugin steps a simple system may have none.

     

    Should you review your current Table structure = yes, particularly if you have relationships that are really 1:1 and not true 1:N

     

    Your example, based on the relationships, to save the value you could probably do it with a Workflow making use of a Action to retrieve the Address from the Contact (push contact to the Action as an input and out put the Address) 

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Featured topics

Loading complete