cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bubbler
Helper I
Helper I

ODATA Filter - CDS Get Items with month restrictions

Is there any way to filter data from CDS by month in ODATA filter section?

Something like:

month(birthdate) eq 11

 

I have also tried this:

contains(birthdate,'-11-')

but contains only accepts strings 😞

 

Any ideas?

Thanks in advance.

3 REPLIES 3
abm
Super User III
Super User III

Hi @Bubbler 

 

Not sure you can directly apply that filter via ODATA. You could do the following way.

 

image.png

 

Above expression I used is as follows:

int(formatDateTime(item()?['createdon'],'MM'))
 
Thanks


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

I really need to filter by year and/or month at data source level, to avoid a huge amount of records to process in PA, as you suggested.

Thanks for the suggestion anyway.

abm
Super User III
Super User III

Hi @Bubbler 

 

Ok your other option is find the first and the last date of each month and use less than or greater to retrieve the values. You probably need some IF or Switch condition to determine which month and set the range of values in a variable or something. Finally use those values in your query.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (63,099)