cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gofunk1
Helper II
Helper II

Advice on new flow required

Hi,

 

I'd like to build a flow that the outputs a table of columns each day, however I only want items in the table that match a few specific conditions.

 

So for example, I have status column, when the status changes to the value "not select", I want power automate to collect all the items in the last 24 hours that have changed to this status and add to a table, then the table is sent in an email each morning. 

 

So I need a reoccurring schedule flow to start, then maybe get file properties, has column changed in a condition, would this work for a start, or does the trigger need to be "when an item is modified".

 

Either way, how would I get it to look back over the past 24 hours only? Is this possible?

9 REPLIES 9
Pstork1
Dual Super User
Dual Super User

If you want to do it once a day then definitely use a recurrence trigger and a get file properties or get items.  Try to filter it with an OData query, although you may not be able to get everything filtered out using just OData.  Then use a Filter array to remove anything else that shouldn't be there.  Use a Data select to specify the exact columns you want in the table and then convert the array to HTML.  That can then be embedded in the email.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks, what would the filter array need to look like to filter out anything that's hasn't been modified in the last 24 hours?

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

hi again - this query isnt working for me: @And(greater(item()?['Modified'],addHours(utcNow(),-24),less(item()?['Modified'],utcNow()))

 

Any idea why?

hi again - this query isnt working for me: @And(greater(item()?['Modified'],addHours(utcNow(),-24),less(item()?['Modified'],utcNow()))

 

Any idea why?

The query is case sensitive.  Its @and(.... not @And(....



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

yes I tried with lowercase - that's just my grammar correction on edge!!

What error are you getting?

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Try the following.  I think the one you are using might be missing a parentheses.  This works for me.

 

@And(greater(item()?['Modified'], addHours(utcNow(), -24)),less(item()?['Modified'], utcNow()))

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (7,260)