cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Get Items filter query by Modified

I have the problem that the 'Modified' cannot be selected in the Filter Query.

 

It works with the Status as below

        Status eq 'Processed

I want this but failed

        greaterOrEquals(item()['Modified'],formatDateTime(Today(),'yyyyMMddHHmmss'))

or    Modified Geq Today()

or    Modified >= Today

 

flow_error.png

How to deal with date comparison ?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Casper_Nguyễn,

 

First of all, if you want to use the operation to match, the ">=" is "ge".

6.PNG

Then I noticed that you used Today(). There is no such function in Expression currently. You could consider using utcNow().

The second parameter of formatDateTime(), according to that you provided, you want to get what I think should be 'yyyy-MM-ddTHH:mm:ss', otherwise the formula cannot be evaluated.

In addition, I am curious about your intention of this action configuration. If you set the Filter Query like this, I think that even if the formula is correct, you may not get any items. Because Modfied is definitely less than the time at the moment.

Could you provide more details about it?

Anyway, a similar formula should look like this:

formatDateTime(utcNow(),'yyyy-MM-ddTHH:mm:ss')

5.PNG

Take a try with your actual needs and feel free let me know if you have any issue.

 

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

2 REPLIES 2
Community Support
Community Support

Hi @Casper_Nguyễn,

 

First of all, if you want to use the operation to match, the ">=" is "ge".

6.PNG

Then I noticed that you used Today(). There is no such function in Expression currently. You could consider using utcNow().

The second parameter of formatDateTime(), according to that you provided, you want to get what I think should be 'yyyy-MM-ddTHH:mm:ss', otherwise the formula cannot be evaluated.

In addition, I am curious about your intention of this action configuration. If you set the Filter Query like this, I think that even if the formula is correct, you may not get any items. Because Modfied is definitely less than the time at the moment.

Could you provide more details about it?

Anyway, a similar formula should look like this:

formatDateTime(utcNow(),'yyyy-MM-ddTHH:mm:ss')

5.PNG

Take a try with your actual needs and feel free let me know if you have any issue.

 

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

Hi @v-bacao-msft

 

Thanks for your answer and this is my last query

 

Modified ge '@{triggerBody()['Getitems_FilterQuery']}' and Modified le '@{triggerBody()['Getitems_FilterQuery_1']}' and Status eq 'Processed'

 

Note: it has expression in '@...'

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (7,321)