cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Annabelle
Frequent Visitor

Flow - How do I fix the error below?

The execution of template action 'Apply_to_each_3' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON')' is of type 'Null'. The result must be a valid array.

 

Several in the community have helped to get this to this point.  Thank you.  This is my first flow that has been build several times and several different ways.  

 

Capture 5.5.2020.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Annabelle,

 

The screenshot you provided is blurry and can't be seen clearly.

Could you please give me the wrong part screenshot separately? Thank you.

 

I can see the error report is '@body('Parse_JSON')' is of type 'Null', and there is a Parse JSON action(maybe there is another Parse JSON action), so I think the error will report when the right branch not met:Annotation 2020-05-07 080953.png

To make sure the Apply to each action could work, the input in the Apply to each action couldn't be empty and it should be a valid array, it should have at least one valid item, so make sure it could work, you could create a Condition action to determine it whether has a value by using length() function. 

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-litu-msft
Community Support
Community Support

Hi @Annabelle,

 

The screenshot you provided is blurry and can't be seen clearly.

Could you please give me the wrong part screenshot separately? Thank you.

 

I can see the error report is '@body('Parse_JSON')' is of type 'Null', and there is a Parse JSON action(maybe there is another Parse JSON action), so I think the error will report when the right branch not met:Annotation 2020-05-07 080953.png

To make sure the Apply to each action could work, the input in the Apply to each action couldn't be empty and it should be a valid array, it should have at least one valid item, so make sure it could work, you could create a Condition action to determine it whether has a value by using length() function. 

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,024)