Reputation: 1
I have a Logic App expression that evaluates the condition correctly, but outputs True instead of true.
A subsequent POST HTTP action fails as the JSON payload that contains this value cannot parse True and requires true.
Key-value pair containing the expression:
"apiTicket": @{equals(body('Get_Ticket_Details')?['takenby'], 'Integration Agent')}
Runtime output:
"apiTicket": True
Error:
{
"error": {
"code": "InvalidRequestContent",
"message": "The request content is not valid and could not be deserialized: 'Unexpected character encountered while parsing value: T. Path 'params.apiTicket', line 15, position 17.'."
}
}
Microsoft reference guide states the equals function should return true or false, not True or False
I understand how to work around this error, but does anyone know why this function works like this?
Upvotes: 0
Views: 34
Reputation: 11383
Logic App equals()
function gives True and False as the answer and not as true or false.
To overcome this you can simply you tolower()
function as below:
Here, I have taken manually as True for apiTicket. You can use it dynamic value:
Change it to:
"apiTicket": tolower(equals(body('Get_Ticket_Details')?['takenby'], 'Integration Agent'))
Output:
Upvotes: 0