The following logic app is triggered at 10 AM and runs a SQL server query. As you can tell from the picture the resultsets are empty.
The conditional check checks whether the resultssets of the query is empty. (2nd pic)
How does this still translate into a True? The result is clearly empty.
2
Anyway, I found another way. For future refence my solution was as follows:
"Compose": { "inputs": "@empty(body('query')?['resultsets'])", "runAfter": { "query": [ "Succeeded" ] }, "expression": { "and": [ { "equals": [ "@outputs('Compose')", "@true" ] } ] }
With your condition, you are trying to compare an array to a boolean.
Instead you could check if the length of the array is not equal to 0:
{ "Condition": { ... "expression": { "and": [ { "not": { "equals": [ "@length(body('query')?['resultsets'])", 0 ] } } ] }, ... } }
Click here to cancel reply.
2
Answers
Anyway, I found another way. For future refence my solution was as follows:
With your condition, you are trying to compare an array to a boolean.
Instead you could check if the length of the array is not equal to 0: