cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alex_B_
Regular Visitor

Leave Request PowerApp - Customize Approval Email

Hi All,

 

We are trying to customize the Leave Request PowerApp, specifically the email that is sent when a request is Approved, specifically we want to include the Request details (Requester, Type, Description, Start Date, End Date) in the email. I've tried editing the code in the Send button located on the ManagerChangeRequestScreen, but nothing I do seems to work.

 

Anyone have any ideas?

 

Al

1 ACCEPTED SOLUTION

Accepted Solutions

Solved...

 

By reading through all that text in the variable, many of the properties are listed:

  • _selectedLeaveItem.Requester
  • _selectedLeaveItem.LeaveType
  • _selectedLeaveItem.StartDate
  • _selectedLeaveItem.EndDate

 

There are other properties, like Title and Description but I did not need them. So I altered the code to be:

 
 

Code.jpg

View solution in original post

3 REPLIES 3
WarrenBelz
Super User III
Super User III

HI @Alex_B_ ,

I am not familiar with the template, but what is the code you are using to send the email?

Hi Warren, here's the code that came with the PowerApp Template, it is located within the SEND button on the ManagerChangeRequestScreen:

 

Office365Outlook.SendEmailV2(
   _selectedLeaveItem.Requester,
   _selectedLeaveItem.Title & If(
   _managerApprove,
      " approved",
      " declined"
   ),
   TextInputMessage.Text,
   {Importance: "Normal"}
);

 

I need to fetch the details of the Request that is currently being approved and append then to TextInputMessage. I can't figure out how to fetch the details. I want to look at the properties of _selectedLeaveItem to see if they are contained within, but all I see is:

 

Alex_B__0-1597687447499.png

 

Is there a way to "read" properties from this?

 

Solved...

 

By reading through all that text in the variable, many of the properties are listed:

  • _selectedLeaveItem.Requester
  • _selectedLeaveItem.LeaveType
  • _selectedLeaveItem.StartDate
  • _selectedLeaveItem.EndDate

 

There are other properties, like Title and Description but I did not need them. So I altered the code to be:

 
 

Code.jpg

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,530)