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 can I filter a lis...
Power Automate
Unanswered

How can I filter a list extracted from the Common Data Service to only show records with a date in one of two columns that is coming up in the next 3 months

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

 

I am trying to filter my list of records so that I only retrieve records that either have an EndDate or a BreakDate that falls within the next 3 months. 

 

Please can someone help.

 

Thanks!!!

 

Filter.png

Shibuya_0-1605632059903.png

 

@Paulie78 

Categories:
I have the same question (0)
  • Paulie78 Profile Picture
    8,422 Moderator on at

    Can you post a sample of the json output from list records (just to get the right field names etc) from list records? Does not have to be the whole thing, but 1 record would be good.

  • Community Power Platform Member Profile Picture
    on at

    Is this what you're after?

     

    Shibuya_0-1605637422617.png

     

  • MJain Profile Picture
    2,450 on at

    Hi @Anonymous ,

     

    You can do advanced find in D365 and download the fetch xml and use the same in List Records action. There is Fetch XML query parameter in the list records action .

     

    Thanks

  • Community Power Platform Member Profile Picture
    on at

    Unfortunately I can't use the CDS (Current Environment) in the environment it's interacting with as I don't have the right permissions. So I have been trying to find a work around, I was thinking there must be a way to filter the data with an ODATA query.

  • MJain Profile Picture
    2,450 on at

    @Anonymous ,

     

    Unfortunately if you do not have permissions on entity no matter what whichever route you use you will get unauthorized error or not allowed error while retrieving data.

     

    Thanks

  • Paulie78 Profile Picture
    8,422 Moderator on at

    So are you able to get the data without any filters? (suggests that you should be able to access it with a filter, but I don't know much about CDS). Just try and odata query and see what happens, for example:

     

    EndDate ge '2020-11-18' and EndDate le '2021-02-18'

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    I managed to fix this by using the following OData filter query: 

     

     

    wt_enddate le addDays(utcnow('yyyy-MM-ddTHH:mm:ssZ'),91) and wt_enddate ge addDays(utcnow('yyyy-MM-ddTHH:mm:ssZ'),0)

     

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard