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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to get all e-mails...
Power Apps
Unanswered

How to get all e-mails adresses in collection in a "run" function for a flow?

(0) ShareShare
ReportReport
Posted on by 49

I have a collection with a list of e-mail adresses (it's dynamic and changes depending on the document that user chooses in my app). 

I also have a button to submit a form and I want to send information about the submit to all e-mail adresses in a collection. 

 

Right now my code that runs the flow looks like this: 

If(_application_Application_Status.Value = "Waiting for approval",
ForAll(colLeadersEmails,'Step1-Emailtoleaders'.Run(ThisRecord.Value,"Acceptance of Application" & _appliaction.ID,"URL TO DOCUMENT")));

 

First argument (ThisRecord.Value) is a "send to" e-mail, second argument is the title of the mail and the third is the body. 

I do get an error with this line of code which says that first argument is empty. 

 

How do I change the code to be able to pass a few e-mail adresses in the first argument? all of them from the collection? 

Categories:
  • VasileR Profile Picture
    298 Super User 2024 Season 1 on at

    Hi @MKPA,

     

    I think it's worth a look at Concat function.

    If you have the collection "colLeadersEmails", with a column "Email", you can concat those:

     

    Concat(colLeadersEmail, Email, "; ");

    This will return a string in the form:  "a.b@email.com; c.d@email.com; ..."

     

    The call to your flow goes like this: 

    'Step1-Emailtoleaders'.Run(
    	Concat(colLeadersEmail, Email, "; "),
    	"Acceptance of Application" & _appliaction.ID,
    	"URL TO DOCUMENT");

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard