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

@empty condition

Hi, when you use the @empty condition on a Create HTML table output, it will always be True even if the HTML table is empty.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @JLam63,

 

The @empty function is used to check if an object, an array or a string is empty, if the Object, array or string is empty, the @empty function would return true. But the output the "Create HTML table" action returns is a table value, so we could not use the @empty function to check if the table value is empty.

 

If the output the "Create HTML table" action returns is empty, the @empty(null) expression would return false. If the output of the "Create HTML table" action returns is not empty, the @empty function would also return false.

 

I have made a test on my side and please take a try with the following flow's configuration:7.JPG

 

When the "Create HTML table" action return empty, the @empty function return false as below:8.JPG

When the "Create HTML table" action doesn't return empty, the @empty function also return false as below:

 9.JPG

 

More details about the empty function in flow, please check the following formula:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#collection...

 

 

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

1 REPLY 1
Community Support
Community Support

Hi @JLam63,

 

The @empty function is used to check if an object, an array or a string is empty, if the Object, array or string is empty, the @empty function would return true. But the output the "Create HTML table" action returns is a table value, so we could not use the @empty function to check if the table value is empty.

 

If the output the "Create HTML table" action returns is empty, the @empty(null) expression would return false. If the output of the "Create HTML table" action returns is not empty, the @empty function would also return false.

 

I have made a test on my side and please take a try with the following flow's configuration:7.JPG

 

When the "Create HTML table" action return empty, the @empty function return false as below:8.JPG

When the "Create HTML table" action doesn't return empty, the @empty function also return false as below:

 9.JPG

 

More details about the empty function in flow, please check the following formula:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#collection...

 

 

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

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

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!

Users online (25,955)