cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RRMX1
Helper IV
Helper IV

Apply to Each Error - not valid array?

Hi,

 

I have a flow that runs when a new response is submitted via a Form.  But it's failing at the very first Apply to Each.  Normally when I use this trigger I would use List of Responses in the Apply to Each box.  But this time my only options are ID, Body and Data, none of which work?

 

Any ideas why this is different and how I can make it run?

 

RRMX1_0-1620828527059.png

The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/resourceData']' is of type 'Object'. The result must be a valid array.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

You don't need an Apply to each there.  Just remove it and make the Get Response Details the next action.  When the forms connector first shipped it returned responses from multiple forms in a collection.  But the trigger now returns a single response.  So you don't need the apply to each anymore.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User
Dual Super User

You don't need an Apply to each there.  Just remove it and make the Get Response Details the next action.  When the forms connector first shipped it returned responses from multiple forms in a collection.  But the trigger now returns a single response.  So you don't need the apply to each anymore.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thanks! It automatically put inside the box so I assumed it was necessary!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,889)