I am trying to check if an excel document has a table, and if it doesn't create one. If it does, don't. The problem I am having is that if I use dynamic content, it goes into for-each loop and the condition will always fail, and is VERY slow.
The Excel document I am working with has 1300 rows.... so the loop is painfully slow. So, I am trying to use expressions manually to skip the for-each. Its a singular check, and shouldn't have to go through each row looking for a table.
Get tables from excel for business (works) -- > Returns [] when no table or ['Table1'] when there is a generic table
Condition:
string(empty(body('Get_tables')?['Value'])) -- > is equal to -- > True | Always returns false.
OR
empty(body('Get_tables')?['Value']) -- > is equal to -- > True | Always returns false
OR
body('Get_tables')?['Value'] -- > is equal to -- > empty() or null | Fails, doesn't like the check
My question is, how do I use the returned value of [] from Get Tables to trigger a TRUE condition and create a table? Future more, if the excel document has a table and returns ['Table1'], don't. It will return FALSE in the condition, but seeing how when its empty it also returns false, I don't trust that its working correctly.
