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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Send email with all collected values from collections in a proper order

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I have to create an escalation email message with details on what failed. I made a decision to create a collection where i will collect a task and the comment from each field, and when user wants to submit, it will check if the collection contains more than 0 rows. If yes, this will generate an email where I would like to have everything that the collection contains in a proper order.

 

So, let's say that the collection name is 'COLissues', and it has 2 columns "Name" and "Comment".

 

If that collected 2 rows:

Name                                     Comment

Work Area                              Problem

Waste Products                      Error

 

I would like the email to look like:

 

"Check has been completed by XXX, and there are the following issues:

Work Area - Problem

Waste Products - Error"

 

Can anyone help me with that? Thank you!

 

I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at
    Re: Send email with all collected values from collections in a proper order

    Hi @plona95,

     

    You can achieve this by adding the Office365Outlook connector and using the SendEmailV2 function. To format the collection we will use Concat() and the html element <br> will be used to create line breaks.

     

    Office365Outlook.SendEmailV2(
     //replace User().Email with the correct email via a reference or between double quotes
     User().Email,
     "Subject here",
     //To use a dynamic value for the name use the structure at the bottom of this code block
     "Check has been completed by XXX, and there are the following issues:<br>" & Concat(COLissues, Name & " - " & Comment, "<br>")
    );
    
    //"Check has been completed by" & User().FullName & ", and there are the following issues:<br>"
    //User().FullName can be replaced with another value / reference

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • plona95 Profile Picture
    on at
    Re: Send email with all collected values from collections in a proper order

    Thank you! I did the same code but for some reason I didn't get an idea to use both columns in one Concat and I tried it separately

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

Coming soon: forum hierarchy changes

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 819 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 308 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 222 Super User 2025 Season 2

Last 30 days Overall leaderboard