-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter Array contains and start with do not work - not a duplicate of 5820 #1264
Comments
Hi @gschultz125, I tried to reproduce this issue, but haven't been successful to do so. If you get the chance, would you be able to send a santized workflow.json over to [email protected] from the error I'm guessing its some type check of item()?['value'], so with the workflow.json we can observe what that type is evaluating to be |
We requested more information to triage this issue. If the issue goes more than 7 days with no more information it'll be automatically closed. |
I was contacted by Eric Wu from Microsoft and provided my solution through an email to Eric. This is the text of the email. After doing some research, I figured it out. I used coalesce on the null value. Below is the code for the action. Coalesce will replace the null with empty string which the contains logic can evaluate. When the coalesce value is not null the correct array is returned. { I get the expected output. { This is going to help me work around a bug that exists in DocuSign’s “Get document tabs from envelope” action. |
Given this isn't a UX issue, I'm going to transfer this to our backend team to work with DocuSign connector to address the output evaluating to null |
This issue is stale because it has been open for 45 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Describe the Bug with repro steps
Array exists in previous action.
Filter Array action using equals works.
{
"type": "Query",
"inputs": {
"from": "@variables('some array')",
"where": "@equals(item()?['value'],'some text')"
},
"runAfter": {
"Initialize_variable_some_array": [
"Succeeded"
]
}
}
Filter Array using contains and starts with fails with the following message.
InvalidTemplate
The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@contains(item()?['value'],'some text')' failed: 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.
Code for contains
{
"type": "Query",
"inputs": {
"from": "@variables('some array')",
"where": "@contains(item()?['value'],'some text')"
},
"runAfter": {
"Initialize_variable_some_array": [
"Succeeded"
]
}
}
Code for starts with
{
"type": "Query",
"inputs": {
"from": "@variables('some array')",
"where": "@startsWith(item()?['value'],'some text')"
},
"runAfter": {
"Initialize_variable_some_array": [
"Succeeded"
]
}
}
What type of Logic App Is this happening in?
Consumption (Portal)
Which operating system are you using?
Windows
Are you using new designer or old designer
New Designer
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
Workflow JSON
Screenshots or Videos
No response
Browser
Edge
Additional context
I understand you are on a holiday freeze. This is not a duplicate of 5820, that was a null value in the array in the designer when using equals to and expecting a result. When using is equals to, there is no error. When using contains and starts with you receive an error. I still receive the error in https://portal.azure.com/?feature.canmodifystamps=true&Microsoft_Azure_EMA=staging.
The text was updated successfully, but these errors were encountered: