condition - if query return results

Alon Keilin 141 Reputation points
2022-08-15T07:26:50.1+00:00

Hey team,

I would like to ask If there is a way to set up a condition that says true if "run query and list results" returns results, else false.

The query's output is a string from log analytics.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,875 questions
0 comments No comments
{count} votes

Accepted answer
  1. Alistair Ross 7,101 Reputation points Microsoft Employee
    2022-08-15T09:11:13.883+00:00

    Hello @AlonKeilin-9495

    The connector for querying Log Analytics will output an array, therefore you can use the built in connector "Condition" to provide different outputs. based on the length of the query output. In my example it is greater than 0, meaning that I need at least 1 result to return true, else it is false

    231088-logicappcondition.jpg


1 additional answer

Sort by: Most helpful
  1. David Broggy 5,686 Reputation points MVP
    2022-08-16T21:36:33.397+00:00

    matching null is also acceptable with logic apps, I've done it both ways.

    how-to-deal-with-possible-null-values-in-control-c.html

    0 comments No comments