Rohit Kumar Singh
Rohit Kumar Singh

Reputation: 77

Yes and No as the output for the condition in logic App

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

and this is what I am trying enter image description here

@if(equals(triggerBody()?['_suspendschedule],"false"),"No","Yes")

Upvotes: 1

Views: 705

Answers (1)

Umesh Lohote
Umesh Lohote

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

Related Questions