I've created a logic app which contains some trigger, an 'http' connector and then an 'If' condition activity. The 'http' connector returns a 'json' result say jsonObj
.
I'm able to check condition as @equal(body('HTTP')['jsonObj'].someProperty,'someValue')
but not able to do a null
check on that someProperty
value.
Below are some ways I tried which are not working.
@equal(body('HTTP')['jsonObj'].someProperty, null) --Unable to save
@equal(body('HTTP')['jsonObj']?.someProperty,'null') --Comparing with string value 'null'
In the Azure portal, open your logic app workflow in the designer. On the designer, select the action where you want to return mock data so that the action details pane appears. After the action details pane opens to the right side, select Testing. On the Testing tab, select Enable Static Result (Preview).
Compare Azure Functions and Azure Logic Apps Functions and Logic Apps are Azure services that enable serverless workloads. Azure Functions is a serverless compute service, whereas Azure Logic Apps is a serverless workflow integration platform. Both can create complex orchestrations.
You can now do:
@equals(triggerBody()['jsonObj']?['someProperty'], null)
It's valid and can be saved but if you try to switch to Basic mode you'll get an error. Can still save though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With