for a workflow I need to get the approvers from an external SharePoint list.
When I add a 'Compose' with an Array format (["firstname.lastname@example.org", "email@example.com"]), it is recognized as an Array object, and I use the Componse in a 'For Each' loop.
But when I get exactly the same string (["firstname.lastname@example.org", "email@example.com"]) from a SharePoint item, it does not get recognized as an Array, and the 'For Each' loop breaks with the following error:
ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@outputs('Compose')' is of type 'String'. The result must be a valid array.
Any idea how I can fix it?
Solved! Go to Solution.
The reason is, Sharepoint List do not support Array type columns, so you will probably have stored it as a 'single line of text', that is treated as a string in Power Automate.
You need to convert it into an array first
-Initialize variable, name myArray, type array, assign as its value the column value output from your 'Get item'
If it does not work, I would suggest to use replace() to remove some characters and combine it with split() using comma as separator
Not in front of my laptop, so I haven't been able to test it
Hope this helps
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.