admin管理员组文章数量:1294324
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?
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
https://learn.microsoft/en-us/azure/logic-apps/workflow-definition-language-functions-reference#equals
I understand how to work around this error, but does anyone know why this function works like this?
Share edited Feb 14 at 6:00 RithwikBojja 11.4k2 gold badges5 silver badges15 bronze badges Recognized by Microsoft Azure Collective asked Feb 12 at 13:03 ww-samww-sam 11 bronze badge 2- Did you try to change it? – RithwikBojja Commented Feb 13 at 3:35
- Please provide enough code so others can better understand or reproduce the problem. – Community Bot Commented Feb 14 at 0:30
1 Answer
Reset to default 0Logic 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:
本文标签: functionLogic App Boolean Expression True not trueStack Overflow
版权声明:本文标题:function - Logic App Boolean Expression True not true - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741597719a2387511.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论