cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
as733y
Helper III
Helper III

Send email with the body formatted with certain conditions

Hello,

 

I'm trying to send an email where it would list x items for person 1 and then y items for person 2 afterwards with a label or something separating the two lists of items from a collection.

 

So, what I've tried is: I have a collection StockTotal with a column FAonly with Yes or No for each item.  Below is what I tried to add to the body section of the send email, but nothing shows up.

 

Does anyone have a better solution to what I'm trying to do, or do I just need to make a change with what I have?

 

 

Concat(StockTotal,LookUp(StockTotal,FAonly="no","Stock Needed: " & Stock & "<br>" & "Quantity Needed: " & TotalNeeded & "<br><br>")))

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @as733y ,

Firstly, you need Filter if you want a group of records

Concat(
   wList,
   Filter(
      StockTotal,
      FAonly="no"
   ),
   "Stock Needed: " & Stock & "<br>" & "Quantity Needed: " & TotalNeeded & "<br><br>"
)

but the structure below should produce some records providing the criteria is valid.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @as733y ,

Firstly, you need Filter if you want a group of records

Concat(
   wList,
   Filter(
      StockTotal,
      FAonly="no"
   ),
   "Stock Needed: " & Stock & "<br>" & "Quantity Needed: " & TotalNeeded & "<br><br>"
)

but the structure below should produce some records providing the criteria is valid.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Thank you sir! Turns out, I had issues with my collection, which was why nothing was showing up.

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.

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 (3,184)