cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Mattw112IG
Level 8

List Records and null

I have a Flow that uses the List Records action on contacts with a filter on fullname.

 

I then have a condition that I say if Value is equal to 'null'... yes/no....

 

The problem is it always says it is not null even if it returns no records?

 

The output body for such a case looks like:

{
"@odata.context": "https://dynamicscrmonline-wus.azconn-wus.p.azurewebsites.net/$metadata#datasets('mycompany.crm')/tab...",
"value": []
}

 

So what does "value":[] mean if not null?

 

Just blank? ""?

 

I've tried all those.

 

Anything else instead of "values" I can use to test on whether or not it found something? Name?

 

Terry

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-zhos-msft
Level 10

Re: List Records and null

Hi @Mattw112IG ,

You should use the condition like below:

The expression is :

empty(body('List_records')?['value']) is equal to true

Capture5.PNG

Best Regards,

Community Support Team _ Zhongys

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

4 REPLIES 4
Super User
Super User

Re: List Records and null

If you could provide an expanded screenshot of your Flow and condition we could provide more help.

With that said, make sure that the column you are referencing in your condition is either part of the default view for the SharePoint list.

This is an often overlooked issue for many people with dealing with SharePoint lists in Flow, they forget to add the column to the default view before referencing it from with the Flow.

If it isn't in the view, Flow wont' see it. For a better understanding of how Flow's logical expressions work, please review the fantastic blog post, A Visual Explanation of Flow Logical Expressions.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Mattw112IG
Level 8

Re: List Records and null

I think in general if you've ever created a flow for Dynamics or really anything that has multiples...  and then you have a condition apply to all with "Values"...

 

How to determine if it has anything or not.

 

I've tried an expression of null, I've tried "", I've tried just blank, ... none of those three worked.

 

I appreciate you responding, but it's not really a list column thing or flow structure thing.

 

Like I showed the output from the body shows value as:

 

The output body for such a case looks like:

{
"@odata.context": "https://dynamicscrmonline-wus.azconn-wus.p.azurewebsites.net/$metadata#datasets('mycompany.crm')/tab...",
"value": []
}

 

what do the two [ 's mean if not null? or blank?

 

Thanks,

Terry

v-zhos-msft
Level 10

Re: List Records and null

Hi @Mattw112IG ,

You should use the condition like below:

The expression is :

empty(body('List_records')?['value']) is equal to true

Capture5.PNG

Best Regards,

Community Support Team _ Zhongys

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

mudassarhassan
Level: Powered On

Re: List Records and null

Hi,

 

This is still not working for me, and I have to think about some other workarounds. It never triggers the No part of condition

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

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

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,330)