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

Filter items based on a date filter query

I've been trying to get this filter query to work but seem to be stuck. I have a date column that I want to show items that are over 370 days old and then delete those sharepoint list items. 

 

Example of what I have but doesn't work is attached

 Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @andrew260z,

 

When configuring Filter Query, we can't use Expression to make any modifications to the column.

And the function needs to be configured in Expression.

Instead of doing something with the column, you could change the second parameters that follow.

I did a test on my side, you could configure Filter Query like this.

Note that you need to add a single quote outside the second argument.

Image reference:

3.PNG

Please take a try.

 

Best Regards,

Barry 

Community Support Team _ Barry
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-bacao-msft
Community Support
Community Support

Hi @andrew260z,

 

When configuring Filter Query, we can't use Expression to make any modifications to the column.

And the function needs to be configured in Expression.

Instead of doing something with the column, you could change the second parameters that follow.

I did a test on my side, you could configure Filter Query like this.

Note that you need to add a single quote outside the second argument.

Image reference:

3.PNG

Please take a try.

 

Best Regards,

Barry 

Community Support Team _ Barry
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

Thank you - yes it does work, I just had a hard time trying to get my head around how to perform that filter. This will help me in the future when doing this kind of thing. 

Any idea on how to do this if the date in the Sharepoint list is stored as a string? I cannot find a way to convert the expression to compare them as dates.

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,877)