cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ammarfassy
Helper III
Helper III

retrieve records created only for the current month

Dears,

 

I am using GetItems action to retrieve records from a sharepoint list.

 

There is a requirement for me to filter only the records created on the current month.

 

how can i create my filter condition (ODATA) ?

 

thanks in advance,

Ammar

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @ammarfassy,

 

To filter only the record created on the current month, you could try to use the function startOfMonth and startOfDay.

 

The function I used is:

1.PNG

 

The first expression is defined as:

startOfMonth(getPastTime(0,'MONTH'))

The second expression is defined as:

startOfDay(utcNow())

Note: each expression should be surrounded by a single quote.

 

More details about the function, please check the following doc:

Workflow definition language

 

Please take try with it on your side.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yamao-msft
Community Support
Community Support

Hi @ammarfassy,

 

To filter only the record created on the current month, you could try to use the function startOfMonth and startOfDay.

 

The function I used is:

1.PNG

 

The first expression is defined as:

startOfMonth(getPastTime(0,'MONTH'))

The second expression is defined as:

startOfDay(utcNow())

Note: each expression should be surrounded by a single quote.

 

More details about the function, please check the following doc:

Workflow definition language

 

Please take try with it on your side.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

thanks a lot Mabel. (y)

Dears,

 

currently i am expereincing an issue on this excel export.

 

I do have records from 1st November to 26th November (SharePoint List).  The generated report contains only the records from 4th November to 26th November (Extracted File). 

 

the forumula wihch i used is as below:

 

ActivityDate ge '@{startOfMonth(getPastTime(0,'MONTH'))}' and ActivityDate le '@{startOfDay(utcNow())}'

 

33333.png

then i tried with all these options:

 

  • ActivityDate ge '@{startOfMonth(utcNow())}' and ActivityDate le '@{startOfDay(utcNow())}'
  • ActivityDate ge '@{startOfMonth(formatDateTime(utcnow(),'yyyy-MM-dd'))}' and ActivityDate le '@{startOfDay(utcNow())}'

but didnt work.

 

I coudnt find what is the issue here.

 

please kindly advise,

thanks,

Ammar

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,256)