web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Joining All outputs of...
Power Automate
Unanswered

Joining All outputs of Apply to Each and using in main flow

(0) ShareShare
ReportReport
Posted on by 118

Hi 

I have a requirement whereby people can submit a request looking for one or more type of care in one or more towns.  A SharePoint list of potential providers is then filtered to return possible matches.  Emails are then sent to the possible matches asking if they are interested in providing care.

 

I am able to filter the List with the first criteria, and then filter that output with the second criteria resulting in an output of possible matches.  

These are inside Apply to Each filters. 

I can see that the filters are returning the correct items, but they are fragmented inside each of the Apply to Each loops and I can only use the result inside the Apply to Each.

How do I list the outputs of the final Apply to Each filter into a single array that can be used in the main body of the flow as my source list for the emails?

 

HMJ_Somerset_0-1637771424449.png

 

 

Categories:
I have the same question (0)
  • mahoneypat Profile Picture
    1,720 on at

    You can initialize an array variable before the Apply to Each, and then add an Append to Array variable step inside the Apply to each.  You can then use the array variable later in the flow.

     

    Pat

     

  • HMJ_Somerset Profile Picture
    118 on at

    Hi @mahoneypat 

    I have tried append to an array following the initial Apply to each Filter array but the flow fails with this error -

    BadRequest. The value of type 'Array' cannot be appended to the variable 'vMatchedAreaProviders' of type 'Array'. The action type 'AppendToArrayVariable' only supports values of types 'Float, Integer, String, Boolean, Object'.

     

    What am I doing wrong?

  • mahoneypat Profile Picture
    1,720 on at

    Looking again at your initial post, can you explain why you have the Apply to Each actions?  If one person triggers the flow and a filtered list of matches is returned to them, an Apply to each should not be needed.

     

    Pat

  • HMJ_Somerset Profile Picture
    118 on at

    Thanks Pat,

     

    The Apply to each is created automatically when I filter the array, but I would have added it anyway as I want all the possible matches from all of the areas selected on the form.  For example someone may have selected Wellington, Yeovil and Wells on the form and so I want to filter the list of providers to pull back all providers who work in any of those requested areas.

     

    Hazel

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard