Reputation: 77
I have a simple requirement , In logic app trigger I am getting a variable called suspendschedule and I want to make
if(suspendschedule == true then value should be Yes if suspendschedule == false then the value should be No
@if(equals(triggerBody()?['_suspendschedule],"false"),"No","Yes")
Upvotes: 1
Views: 705
Reputation: 66
if your suspendschedule is a type of bool then Try these
first, check for the true condition because if the field is null or missing in triggerBody it will go in else
@if(equals(triggerBody()?['suspendschedule'],bool(1)),'Yes','No')
if it is in string format or you are not sure try this it will check both bool and string
first, check for the true condition because if the field is null or missing in triggerBody it will go in else
@if(equals(triggerBody()?['suspendschedule'],'true'),'Yes','No')
Upvotes: 1