The error is:
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_3')?['Credit Union name']' is of type 'String'. The result must be a valid array.
i have done some research and think there is a need to use JSON to parse the info but am not sure exactly how to go about that. Please help me understand what resources to use in order to understand how to correctly parse this information so the Flow will work correctly.
Please post a screen shot of your Flow - that will make it much easier to assist.
It is a fairly simple Flow. It is pulling data from an .xlsx file and importing it into a SharePoint List. It tests to see if the record exists and then will update the list or if the record does not exist it adds to the list. I am gathering up screen shots now and will post in just a few.
This is the simple Flow:
It grabs the body values from the .xlsx file:
And then fails due to a type casting error or parsing error:
This is the outline of that part of the Flow:
Here is the XML code:
{
"inputs": {
"host": {
"connectionName": "shared_sharepointonline_1",
"operationId": "GetItems",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline"
},
"parameters": {
"dataset": "hiddensharepointpath/sites/AuxSales",
"table": "hiddentableid",
"$filter": "Title eq '@{items('Apply_to_each')?['Charter number']}'",
"$top": 1
},
"authentication": "@parameters('$authentication')"
}
}
Could you please provide a screenshot of what your Apply to each actions look like in the edit window?
I have added the apply to each flow as an image and as xml. Here is an image of the Full Apply to each section:
Full Apply to Each section
It's difficult to get a handle on the big picture, but I believe the issue is that the Credit Union name is not an array but a single value - therefore you can't loop through. Does a Credit Union Name appear more than once in your Excel table?
You are correct as it is a single row column value in a table of 5000+ records. It is a list of 5000+ Credit Unions with about 15 columns that pushes data to a Credit Union SharePoint List with the same table layout. I did not create this Flow just inherited it but it did work at one point, lol.
It appears that you need to iterate over something at a higher level rather than the individual column name if possible, considering it doesn't look like you need to access the credit union name within the query itself. As Scott said, the dynamic credit union name only provides a string according to your error.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
User | Count |
---|---|
23 | |
12 | |
11 | |
10 | |
8 |
User | Count |
---|---|
33 | |
24 | |
21 | |
17 | |
16 |