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 / Filtering Modified On ...
Power Apps
Answered

Filtering Modified On for parent and all child records in Dataverse

(0) ShareShare
ReportReport
Posted on by 168

I'm trying to find the best approach to query a Dataverse table to get a list of all records where any changes have been made to either the parent record or its children (through a 1-N relationship) in the past 24 hours. I can't seem to get this to work through FetchXml. I did consider creating another date field on the parent entity with a flow triggered by any modifications to the child table, but that feels an inelegant solution. Has anybody else got an alternative approach?

 

<fetch>
 <entity name="parent_entity">
 <attribute name="parent_name" />
 <filter type="or">
 <condition attribute="modifiedon" operator="last-x-hours" value="24" />
 </filter>
 <link-entity name="child_entity" from="parent_id" to="parent" link-type="outer" alias="child">
 <attribute name="child_name" />
 <filter type="or">
 <condition attribute="modifiedon" operator="last-x-hours" value="24" />
 </filter>
 </link-entity>
 </entity>
</fetch>

Thanks!

  • Verified answer
    a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    You can use the "or" condition between fields that are on the different levels of joins. Here is an example that you can adapt to your needs:

    <fetch>
     <entity name="account">
     <attribute name="accountid" />
     <attribute name="name" />
     <filter type="or">
     <condition attribute="modifiedon" operator="last-x-hours" value="24" />
     <condition entityname="child" attribute="modifiedon" operator="last-x-hours" value="24" />
     </filter>
     <link-entity name="contact" from="parentcustomerid" to="accountid" link-type="outer" alias="child" />
     </entity>
    </fetch>
  • SimonSays Profile Picture
    168 on at

    Thank you! It was as simple as that. Appreciate your answer.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard