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

Notifications

Announcements

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,413 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard