cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resident Rockstar
Resident Rockstar

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

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

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.

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
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager
Power Platform Communities

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.

@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.  

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.

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

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
Top Kudoed Authors
Users online (9,054)