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 III
Dual Super User III

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 III
Dual Super User III

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

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,619)