cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

I want a flow to continue a flow if a SP Get Item returns null from a Filter Query

A little complex here... but I need a flow to continue if I do a "get item" and the Odata filter returns nothing.  I need it to do nothing if the filter returns a list.  I cannot use a configure after run, becasue it does not see returning nothing in the filter as a fail.  Both conditions are a success, so that wont discriminate.

 

All I am attempting to do is have flow create an item, but only after turning up nothing for the search critieria in the Get Item.  Perhaps there is another way of doing it.  Please advise.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: I want a flow to continue a flow if a SP Get Item returns null from a Filter Query

Ok, I finally got this working.  Yet another answer myself, after 15 hours of sheer BEATING!

 

The trick here was to get the null reported action OUTSIDE of the apply to each wrapper.  Since my Get Rows actually only return ONE value (limited by Top Count), I was able to assign a variable immediately afterwards for my DocumentID value.  I then was able to use that tag in the condition, and subsequent item updates and it would not "pop" in an Apply to Each wrapper.  That was the only way I could get this to work right.  

 

image.png

View solution in original post

6 REPLIES 6
Community Support Team
Community Support Team

Re: I want a flow to continue a flow if a SP Get Item returns null from a Filter Query

Hi @martinav,

 

Which action are you using? I assume that it might be the Get items action.

 

Do you want to move on to next action when the Get items action returns nothing for a specific column?

 

If yes, you may try to use the code ColumnName eq null in the Odata filter query field so that only columns that have null value will be returned.

 

Please take this for a reference and have a try with it on your side.

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Administrator
Administrator

Re: I want a flow to continue a flow if a SP Get Item returns null from a Filter Query

Hey, @martinav!

 

It appears as though @v-yamao-msft would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!

 

Thank you for being an active member of the Flow Community!

 

-Gabriel

Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!
Super User
Super User

Re: I want a flow to continue a flow if a SP Get Item returns null from a Filter Query

Sorry for the delay, I have several issues.  I will get back to it as soon as I can as I work through other issues.

Super User
Super User

Re: I want a flow to continue a flow if a SP Get Item returns null from a Filter Query

@v-yamao-msft,

 

Here is more information on this request, for I have run into this again.

 

I have many circumstances that an SQL Get Rows will actually find nothing.  In that case, I need my subsequent actions to continue.  When the Get Rows action finds nothing, it currently stops the flow.  I have many other sources in this flow that need to update an item that must continue, despite the null() result of Get Rows.

 

Note below, I have a rather complex nested situation going on.  The actual result of my Get Rows - DocumentID action will be a single row.  But, Get Row does not allow for filters.  Regardless, a null() value of any "Get" fuction just stops things.  

 

image.png

This is the result.  It doesnt error, but nothing updates because of the Null().

 

image.png

You can see that the Apply to each 5 reports "The input array was empmty.  "Get rows - Rev" is not empty.  The results from that action needs to be applied, but they do not, because "Get Rows - DocumentID" returns nothing.  

Super User
Super User

Re: I want a flow to continue a flow if a SP Get Item returns null from a Filter Query

I found something similar to try.  This is ineffective as well.  I'm going on half a day of wasted time, I need resolution ASAP to keep this moving along.  Please help.  This cannot be that difficult.  I added moved the Get Rows - DocumentID up out of the apply to each, and a null value still results in nothing returned. (

 

image.png

 

Here is the output

 

image.png

 

Just as a test, when I move my actions to the "false" side of the condition, and I apply a case where a row exists for the Get Rows action, it works fine.  It is still a problem when there is no row returned.

Super User
Super User

Re: I want a flow to continue a flow if a SP Get Item returns null from a Filter Query

Ok, I finally got this working.  Yet another answer myself, after 15 hours of sheer BEATING!

 

The trick here was to get the null reported action OUTSIDE of the apply to each wrapper.  Since my Get Rows actually only return ONE value (limited by Top Count), I was able to assign a variable immediately afterwards for my DocumentID value.  I then was able to use that tag in the condition, and subsequent item updates and it would not "pop" in an Apply to Each wrapper.  That was the only way I could get this to work right.  

 

image.png

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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 Kudoed Authors (Last 30 Days)
Users online (6,082)