cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Use each row of Collection as Email details.

Howdy all.

 

I'm working on an app to help reorder some items (each item can be from a different vendor).  As users would choose what needs reordered, these items get added to a collection.  Now, I'd like to use the information in each row of that collection to generate an email requesting those items.

 

I'm stuck trying to get the info from each row.  From what I've seen in videos, I know ForAll, will help loop through the collection, but I'm stuck when trying to pull the information of each row in the collection.

 

Any thougths or workarounds?

Thank you!

Lou

1 ACCEPTED SOLUTION

Accepted Solutions
CarlosFigueira
Power Apps
Power Apps

You can use the Concat function to combine the elements of the collection into a text that can be sent in the body of an e-mail. For example, if you want to put in the e-mail the properties Name and Age of the elements in your collection, you can have the e-mail body use an expression like the one below:

"<p>To whom it may concern,</p>" & 
"<p>Those are the items selected by the user:</p>" &
"<ul>" &
    Concat(
        MyCollection,
        "<li>" & Name & " - " & Age & " years old</li>") &
"</ul>" & 
"<p>Please take the appropriate action.</p>"

You can look at the attached app for an example of the usage. To open it, save it locally, go to https://create.powerapps.com, select Open -> Browse, and find the file that you previously saved.

Hope this helps!

View solution in original post

2 REPLIES 2
CarlosFigueira
Power Apps
Power Apps

You can use the Concat function to combine the elements of the collection into a text that can be sent in the body of an e-mail. For example, if you want to put in the e-mail the properties Name and Age of the elements in your collection, you can have the e-mail body use an expression like the one below:

"<p>To whom it may concern,</p>" & 
"<p>Those are the items selected by the user:</p>" &
"<ul>" &
    Concat(
        MyCollection,
        "<li>" & Name & " - " & Age & " years old</li>") &
"</ul>" & 
"<p>Please take the appropriate action.</p>"

You can look at the attached app for an example of the usage. To open it, save it locally, go to https://create.powerapps.com, select Open -> Browse, and find the file that you previously saved.

Hope this helps!

Anonymous
Not applicable

Thank you Carlos, I'll give that a try.  I'll look into the app example if I get stuck.

I might have a following question around crossreferencing in another list via lookup the vendor for each item in the collection... but I want to take a stab at it first, I've been learning from the multiple examples folks share around.

 

Thank  you and will keep you all posted.

Lou

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,985)