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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,773)