You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please note the below is being done in PowerAutomate and not Logic Apps, but my understanding is the functions used in PowerAutomate are the same as Logic Apps and hence logging the bug here.
The function contains() when evaluating an array of integers for a given integer value from another array, the contains result returns "false", where the expected result is "true".
To replicate, please create a new flow and follow the below. Please note i used the "SELECT" in this way to try and understand why a different flow was not working, that is to visually demonstrate the inputs/outputs from the evaluations.
I have two arrays containing integers, which I want to compare:
First Array (contains all numbers in a range)
[
84,
85,
86,
87
]
Second Array (contains just two of the number in the above range)
[
87,
84,
]
Select:
Note
In the above image titled "Select":
"From" = body('FirstArrayRange') >> First Array (as described above)
Mappings:
"id" = item() >> (current item from 'FirstArrayRange')
"evaluationResults" = contains(body('SecondArrayIds'), item())
"selectIds" = body('SecondArrayIds') >> Second Array (as described above)
Describe the Bug
Please note the below is being done in PowerAutomate and not Logic Apps, but my understanding is the functions used in PowerAutomate are the same as Logic Apps and hence logging the bug here.
The function contains() when evaluating an array of integers for a given integer value from another array, the contains result returns "false", where the expected result is "true".
The contains() function documentation
https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#contains
states this should be possible.
See reproduction steps below to understand.
Plan Type
Standard
Steps to Reproduce the Bug or Issue
To replicate, please create a new flow and follow the below. Please note i used the "SELECT" in this way to try and understand why a different flow was not working, that is to visually demonstrate the inputs/outputs from the evaluations.
I have two arrays containing integers, which I want to compare:
First Array (contains all numbers in a range)
[
84,
85,
86,
87
]
Second Array (contains just two of the number in the above range)
[
87,
84,
]
Select:
Note
In the above image titled "Select":
"From" = body('FirstArrayRange') >> First Array (as described above)
Mappings:
"id" = item() >> (current item from 'FirstArrayRange')
"evaluationResults" = contains(body('SecondArrayIds'), item())
"selectIds" = body('SecondArrayIds') >> Second Array (as described above)
Actual Results
[
{
"id": 84,
"evaluationResult": false,
"selectIds": [
87,
84
]
},
{
"id": 85,
"evaluationResult": false,
"selectIds": [
87,
84
]
},
{
"id": 86,
"evaluationResult": false,
"selectIds": [
87,
84
]
},
{
"id": 87,
"evaluationResult": false,
"selectIds": [
87,
84
]
}
]
Expected Result
[
{
"id": 84,
"evaluationResult": true,
"selectIds": [
87,
84
]
},
{
"id": 85,
"evaluationResult": false,
"selectIds": [
87,
84
]
},
{
"id": 86,
"evaluationResult": false,
"selectIds": [
87,
84
]
},
{
"id": 87,
"evaluationResult": true,
"selectIds": [
87,
84
]
}
]
Note the Workflow JSON is a copy of the SCOPE containing all the relevant code.
Workflow JSON
Screenshots or Videos
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: