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

@empty condition on a date field in an SPO doc library always returns true

I have a recurrence flow that runs once a day and needs to check whether a custom datetime SharePoint (modern) column, NextReview, is empty or not.  After the get items action there is a condition control with: 

@empty(triggerBody()?['NextReview'])

but it always returns true, that is it takes the next action on the basis that it thinks the column in SharePoint is empty which is not the case. I've not had this problem with SharePoint lists, it only seems to affect document libraries and seems to happen whatever the column type. It looks to be a bug but does anyone have a suggestion for a way round it?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: @empty condition on a date field in an SPO doc library always returns true

Hi @RobElliott,

 

Your expression has nothing to do with Get items action, so you can't check if the specified field is empty.

Because your current configuration of the trigger does not have anything to do with the Library, it just controls when the Flow will fire.

You should configure your Flow like this. The Condition can be configured in two ways, as below:

Method 1:

9.PNG

Method 2:

10.PNG

Please take a try again.

 

Best Regards,

Barry

Community Support Team _ Barry
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

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: @empty condition on a date field in an SPO doc library always returns true

Hi @RobElliott,

 

Your expression has nothing to do with Get items action, so you can't check if the specified field is empty.

Because your current configuration of the trigger does not have anything to do with the Library, it just controls when the Flow will fire.

You should configure your Flow like this. The Condition can be configured in two ways, as below:

Method 1:

9.PNG

Method 2:

10.PNG

Please take a try again.

 

Best Regards,

Barry

Community Support Team _ Barry
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

Highlighted
Super User
Super User

Re: @empty condition on a date field in an SPO doc library always returns true

Thanks Barry @v-bacao-msft that works perfectly now with Method 1. I really should have thought of that myself!.

 

Rob

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Users online (9,395)