cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gtsmith
Frequent Visitor

@empty condition not working properly after 'Get Items' action

I have a flow that is set to trigger on a monthly basis to check for empty fields in a particular column. The '@empty' function works perfectly well if I use a simple 'When a new item is created' trigger, but it does not work on an existing list where I have to use the 'Get Items' trigger:

 

@empty.JPG

 

The condition simply returns true for each item, even if that item has data. I know the '@empty' syntax is correct because it works when I use the 'When a new item is created' trigger instead. 

 

Any ideas? I'm stumped!

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @gtsmith,

 

Could you please share a bit more about the data structure of your SharePoint list?

Which type is the Dec Update column in your SharePoint list?

 

I think there is something wrong with the formula in your Condition box. I have made a test on my side and the flow works well. My flow’s configuration as below:10.JPG

Within Condition box, click “Edit in advanced mode”, type the following formula:

@empty(items('Apply_to_each')?['Dec_x0020_Update']) 

The flow works successfully as below:11.JPG

Please consider take a try to change your formula within Condition box to above formula that I provided and check if the issue is solved.

 

Best regards,

Kris

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

3 REPLIES 3
gtsmith
Frequent Visitor

I came up with a clever workaround for now. I created a column labeled 'ThisFieldToRemainBlank' and changed my condition from '@empty' to if 'Dec Update' is equal to 'ThisFieldToRemainBlank'. The workaround works for now (as long as no one enters data into my 'ThisFieldToRemainBlank' column) but I'd like to know if anyone has a proper solution to the issue. 

 

Thanks,

v-xida-msft
Community Support
Community Support

Hi @gtsmith,

 

Could you please share a bit more about the data structure of your SharePoint list?

Which type is the Dec Update column in your SharePoint list?

 

I think there is something wrong with the formula in your Condition box. I have made a test on my side and the flow works well. My flow’s configuration as below:10.JPG

Within Condition box, click “Edit in advanced mode”, type the following formula:

@empty(items('Apply_to_each')?['Dec_x0020_Update']) 

The flow works successfully as below:11.JPG

Please consider take a try to change your formula within Condition box to above formula that I provided and check if the issue is solved.

 

Best regards,

Kris

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

Thank you very much, Kris - your modified formula is exactly what I was looking for. It worked fine on my end too. 

 

Thanks again.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,209)