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

Filter query from excel

Hey

i need some logic or help here 😊.

my flow is working great but I need to modify it little bit.

 

I have a excel file with a column called date - in there I have many dates wich means the flow should not run if the date in excel match today date, to do it more smoothly I use filter query in list excel table with utcnow and it works fine if the date today is there but if it isn’t then it returns empty null or somethingelse and I can’t work with it in condition. How can I grab the result or how can I stop the flow if filter query is not return anything? Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @BR1984 ,

 

After your Excel action, you can use the length function to get the rows returned and use that within a condition.

 

ericcheng_1-1626245556467.png

 

Paste this into the expression for the Compose action.  

 

length(outputs('List_rows_present_in_a_table')?['body/value'])
 

We can see there were 6 rows returned.

 

ericcheng_0-1626245539181.png

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

View solution in original post

3 REPLIES 3
Mira_Ghaly
Dual Super User II
Dual Super User II

@BR1984 

Can  you share screen of your flow please?

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
eric-cheng
Solution Sage
Solution Sage

Hi @BR1984 ,

 

After your Excel action, you can use the length function to get the rows returned and use that within a condition.

 

ericcheng_1-1626245556467.png

 

Paste this into the expression for the Compose action.  

 

length(outputs('List_rows_present_in_a_table')?['body/value'])
 

We can see there were 6 rows returned.

 

ericcheng_0-1626245539181.png

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

thank you eric

that was exactly what I needed.

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,635)