Skip to main content

Notifications

Power Automate - Building Flows
Answered

The result must be a valid array

Posted on by 2,059
Error details:The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each')?['POCName']' is of type 'String'. The result must be a valid array.
 
Kindly suggest how to loop through POCname value and create a folder in document library
 
 
  • Verified answer
    Expiscornovus Profile Picture
    Expiscornovus 30,664 on at
    The result must be a valid array
    You can use a split function to convert your text field value (multiple lines) to an valid array. You can use split on the line feed character, aka %0A:

    Below is an example
     
    split(item()['POCName'], decodeUriComponent('%0A'))
     
    Test result
     



    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard