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 / Find Dataverse records...
Power Apps
Answered

Find Dataverse records created since certain date | date comparison issues

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am basically building this exact flow Create Dataverse Links / URLs in HTML Tables using Power Automate — Amey Holden | ABC Enthusiast & Power Platform Specialist, but i want to find all the records that were created within the last 7 days. I am having issues with the date comparison in the filter records box.

 

CreatedOn = system column from Dataverse table. Format = 

"2022-09-09T19:13:40Z"

 

Filter Rows code

CreatedOn gt subtractFromTime(utcNow(),7,'Day','F')

Screenshot 2022-09-29 222229.png

 

Error Message: Syntax error at position 20 in 'CreatedOn gt Friday, September 23, 2022 4:06:55 AM'.

  • Verified answer
    Mira Ghaly Profile Picture
    11,415 Moderator on at

    @zachm 

    can you try this?

    Microsoft.Dynamics.CRM.LastXDays(PropertyName='createdon',PropertyValue=7)

     

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @zachm ,

     

    @Mira_Ghaly has a great option and another I use frequently is the FetchXML option as shown below (as an example).  This worked successfully to pull the filtered list with only the attributes I selected.  Of course this is an example from the Accounts table...

     

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
    <entity name="account">
    <attribute name="name" />
    <attribute name="primarycontactid" />
    <attribute name="telephone1" />
    <attribute name="accountid" />
    <order attribute="name" descending="false" />
    <filter type="and">
    <condition attribute="createdon" operator="on-or-after" value="2022-01-16" />
    </filter>
    </entity>
    </fetch>

     

    You can replace the hard coded date with a variable that you set of course as well...

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard