cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

Emailing out multiple entries on power apps

So I am trying to configure a email button that will email out a users weekly entries to their respective manager. In the image below you can see that I've added in the button and also gotten the formula in place for it to happen. 

 

Screenshot (42).png

 

As you can see in the image below the email was sent successfully but the only issue is that entries weren't sent. 

Screenshot (43).png

The datasource used is a List on SharePoint. I would want that what the manager sees is a replica to the SharePoint list rather than on the app so they can also export it to excel in a format they are more used to. 

 

Also when the entries have been sent the following week when they want to send out their new entries how they send it out without sending out inputs from previous week.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Emailing out multiple entries on power apps

Hi @SandraAkujobi ,

Could you please share a bit more about your scenario?
Do you want to send multiple entries from your Gallery to your respective manager?

 

Based on the needs that you mentioned, I think the Filter function and Concat function could achieve your needs. On your side, you could consider use Filter function to find these entered records for current sign in user in current week, and then concat these records into a HTML table using Contact function, then embed this HTML table into your email body.

 

On your side, you could consider modify the formula within the "Send Email" button to following:

Office365Outlook.SendEmail(
                           Office365Users.ManagerV2(User().Email).mail,
                           "TimeSheet Experiment",
                           "<h3>Asset Checkout Notification</h3>" & 
                           "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
     "<tr style='background-color:#efefef' >
         <td>Column1</td> <td> Column2 </td> <td> Column3 </td>
     </tr>
     " &
                           Concat(
                                  Filter(
                                           'SP List', 
                                            'Created By'.Email = User().Email,
                                            DateValue(Text(Created)) >= DateValue(Text(DateAdd(Today(), -Weekday(Today())+1),DateTimeFormat.ShortDate)) && DateValue(Text(Created)) <= DateValue(Text(DateAdd(Today(), -Weekday(Today())+1),DateTimeFormat.ShortDate))
                                  ),
                                  "<tr><td>" & Column1 & "</td><td>" & Column2 & "</td><td>" & Column3 & "</td></tr>"
                           ) & "</table>",
                           {
                              IsHtml: true
                           }
)

The Filter function used within above formula is used to filter these entered records for current sign user in current week. The Concat function is used to concatenate these records into a HTML string table, then embedded within your email body. The Column1, Column2, Column3, ... within the Concat function are all columns from your SP List, you could specify them as you needed.

 

More details about sending a HTML Table within an email body, please check the following blog:

https://powerapps.microsoft.com/en-us/blog/html-email-reporting-with-tabular-data/

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Emailing out multiple entries on power apps

Hi @SandraAkujobi ,

Could you please share a bit more about your scenario?
Do you want to send multiple entries from your Gallery to your respective manager?

 

Based on the needs that you mentioned, I think the Filter function and Concat function could achieve your needs. On your side, you could consider use Filter function to find these entered records for current sign in user in current week, and then concat these records into a HTML table using Contact function, then embed this HTML table into your email body.

 

On your side, you could consider modify the formula within the "Send Email" button to following:

Office365Outlook.SendEmail(
                           Office365Users.ManagerV2(User().Email).mail,
                           "TimeSheet Experiment",
                           "<h3>Asset Checkout Notification</h3>" & 
                           "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
     "<tr style='background-color:#efefef' >
         <td>Column1</td> <td> Column2 </td> <td> Column3 </td>
     </tr>
     " &
                           Concat(
                                  Filter(
                                           'SP List', 
                                            'Created By'.Email = User().Email,
                                            DateValue(Text(Created)) >= DateValue(Text(DateAdd(Today(), -Weekday(Today())+1),DateTimeFormat.ShortDate)) && DateValue(Text(Created)) <= DateValue(Text(DateAdd(Today(), -Weekday(Today())+1),DateTimeFormat.ShortDate))
                                  ),
                                  "<tr><td>" & Column1 & "</td><td>" & Column2 & "</td><td>" & Column3 & "</td></tr>"
                           ) & "</table>",
                           {
                              IsHtml: true
                           }
)

The Filter function used within above formula is used to filter these entered records for current sign user in current week. The Concat function is used to concatenate these records into a HTML string table, then embedded within your email body. The Column1, Column2, Column3, ... within the Concat function are all columns from your SP List, you could specify them as you needed.

 

More details about sending a HTML Table within an email body, please check the following blog:

https://powerapps.microsoft.com/en-us/blog/html-email-reporting-with-tabular-data/

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Post Patron
Post Patron

Re: Emailing out multiple entries on power apps

Hi @v-xida-msft I just tried out the screenshot you sent, there's just one issue displayed.

Here is a screenshot of the detailed issue;

Screenshot (70).png

 

So the scenario has kind of changed because of how complex the whole process is. So because the entries will be viewed by more than manager, we decided that we will create a group email (managers) for the different stages, so G1-G4. So an employee will send out their weekly entries to be viewed by G1, anyone from the g1 email can approve the entries and once that's done then the entries are sent over to G2 to view and approve and so on till it reaches to G4 which is the accounts email who will process the whole timesheet. It's quite a challenge to complete but if you have any inputs that would be very helpful. 

 

 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,021)