Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

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 

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: 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

    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)

     

  • Paulie78 Profile Picture
    8,416 Super User 2025 Season 1 on at
    Re: 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

    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'

     

  • MJain Profile Picture
    2,450 on at
    Re: 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

    @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

  • Community Power Platform Member Profile Picture
    on at
    Re: 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

    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
    Re: 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

    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
    Re: 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

    Is this what you're after?

     

    Shibuya_0-1605637422617.png

     

  • Paulie78 Profile Picture
    8,416 Super User 2025 Season 1 on at
    Re: 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

    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.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1