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 Automate / How to filter rows wit...
Power Automate
Unanswered

How to filter rows with lookup column in Dataverse

(0) ShareShare
ReportReport
Posted on by

Hello Community,

 

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?

 

D365_Eric_1-1655358197696.png

Any insights would be greatly appreciated!

 

Thank you!

Categories:
I have the same question (0)
  • StretchFredrik Profile Picture
    3,395 Super User 2025 Season 2 on at

    {ColumnName} eq '{YourDynamicData}'

  • Community Power Platform Member Profile Picture
    on at

    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?

    D365_Eric_0-1655382090844.png

    D365_Eric_1-1655382178428.png

     

  • StretchFredrik Profile Picture
    3,395 Super User 2025 Season 2 on at

    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. 

  • Community Power Platform Member Profile Picture
    on at

    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... 

  • Verified answer
    Rose2022 Profile Picture
    15 on at

    You should use _parentcustomerid_value which holds a numerical value of the accountid. Hope it works! 

  • CRMMaven Profile Picture
    2 on at

    Can I use month day and year functions if the filter condition for the date field 

    example 

    new_certificationanniversarydate ne null and month(new_certificationanniversarydate) eq @{utcNow('MM')} and day(new_certificationanniversarydate) eq @{utcNow('dd')} and year(new_certificationanniversarydate) ge @{utcNow('yyyy')}

     

    When using this function flow try to execute the step multiple times and every time it returns a status "notimplemeted" 

    can you suggest alternate way to get this done.

  • Winsderl Profile Picture
    7 on at

    Thanks @Rose2022 , this solution definately works for me.

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard