cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Casper_Nguyễn
Level: Powered On

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

Re: Get Items filter query by Modified

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

Re: Get Items filter query by Modified

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

Casper_Nguyễn
Level: Powered On

Re: Get Items filter query by Modified

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
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,759)