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

I have the same question (0)
  • Verified answer
    Mira Ghaly Profile Picture
    11,413 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

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard