I have been trying to figure out how to set the filter query in the List Rows action in Dataverse, to only get the related records from the same parent lookup. As an example, for each Account, we have multiple child Contacts associated with the same parent account record (i.e. having the account as the lookup on the contact).
In the Power Automate flow, I use the List Rows action to first get all the accounts in Dataverse, and then use "Apply to each" operation to loop through each account. For each loop, I want to use the List Rows action to get all the related contact records associated with the same account via the account lookup. How can I define that filter query so that the List Rows action in each loop returns only the list of related contacts for the same account lookup, as we loop through each account?
Any insights would be greatly appreciated!
Solved! Go to Solution.
Hi @StretchFredrik ,
Thanks for your reply. I tried the following, however it's not working. It gives me the following error:
Did I miss anything in terms of syntax?
The column doest exist, are you taking the "backend" name of the column? I usually get this by looking at the API call and seeing what the internal name for the field is.
Hi @StretchFredrik ,
Yes, in this case, in the filter condition, I am putting parentcustomerid eq 'Account' (Account being the Dynamic Data). The field "parentcustomerid" is the out of the box internal name of the lookup field to Account on the Contact entity. Not sure why it's complaining the field doesn't exist because it's definitely there...
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.