web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Autopopulate a Dataver...
Power Apps
Unanswered

Autopopulate a Dataverse Lookup field using a Flow with Expand Query

(0) ShareShare
ReportReport
Posted on by 31

Hi Everyone

 

I have a tricky Power Automate which I am trying to resolve.  I have posted this in the power automate forum as well, but it may be more of a Dataverse question, so I post it here as well.  I am hoping I can find a guru in both Dataverse and Power Automate.  

 

Let me give you the summary:

  • I have a ‘flow’ which is auto-populating a “Status Report” table in the Dataverse. 
  • The data to auto-populate the “Status Report” table is drawing from a “Services” table. 
  • I am surfacing the “Status Report” entity list through a Powerapps Portals. 
  • This “Status Report” entity list needs to be filtered by the logged-in user.  To do that, I need to be able to populate the table with data from the default “Contact” table via a Lookup. 
  • The “Services” table has the “Contact” information in it via a lookup, but I can’t figure out how to get the “Status Report” table to accept it.  

Let me walk you through the ‘flow’:

Firstly, I have a “List Rows” Action.  This is pulling through all of the data from the “Services” table.  I have included an “Expand Query” to lift the data from the “Contact” table as well.  This is as follows:

pternouth1_0-1644878602733.png

 

 

In my next action (nested in an ‘apply to each’), I am doing an “add Row” to the “Status Report” table.   Many of the fields in the target table (“Status Report”) are populating correctly based on the data from ‘list rows’.  The challenge comes when the target table field is a ‘lookup’ - but there are two types of these.  Lookup to the "Services" table and Lookup to the "Contact" table.

 

Where the Target table field is a lookup from the “Services” table directly, I am able to inject the data by using the following:

pternouth1_1-1644878602736.png

 

 

I have seen other threads in thecommunity on this one and it is working correctly.

 

However, when I try to do the same thing with data picked up from the “Expand Query”, I can’t find the correct expression to insert the ServiceProvider contactid (from the "Expand Query") into the target table (“Status Report”) lookup field.  I have tried about 20 permutations, but can't nail it.

 

Can anyone help me to the correct ‘expression’ for this?

 

Thanks very much

I have the same question (0)
  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @pternouth1 

    Please try the below:

    /contacts/items('Apply_to_each')?['actg_serviceprovider']['contactid']

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 101 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 70

Last 30 days Overall leaderboard