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

Leave Request App issue

Hi There,

I am currently working on a PowerApps Leave Request Form, I used the default template and customize the app as i want, Now the problem is when i try to do a test by submitting a leave request it is sending an email confirmation to myself than sending it to my manager. 

 
 

I have attached pics,

1- Shows when i submit

2- What i receive as an email

 

Please can someone help me out?

 

Thanks

Omer

 

7 REPLIES 7
Super User
Super User

We'll need more info to help. Please show us the formula used that sends the request email.

 

Thanks

Sure,

 

The formula was loaded by default,

See attached pic.

 

Also my disorganization has more than 1 manager and different employees report to different managers, Now i want all the employees to submit their Leave request to their managers.

 

If you want any specific formula please let me know.

 

Thanks

Omer

So looking at that, it seems there is a function somewhere that is triggered when _submittingRequest is set to true. If you can find that, then we'll need so see that. It seems the email is sent with default values and not ones set by the controls on your form, but we'll need to see the formula to know for sure.

@itsupport try removing the Office365Users connection then re-adding it back in.

 

There are plenty of issues with this App, just search 'Leave request' on these forums to have a read through them. One of these stories suggested using the app as a guide to building your own app, which would likely cause you a lot less heartache

Community Support
Community Support

Hi @itsupport ,

Could you please share a bit more about your issue?

Do you mean that the email sent to yourself rather than your Manager?

 

Actually, it is an known issue with the "Leave Request" template app. Please consider take a try to modfy the formula within the OnVisible proeprty of the ConfirmationScreen to following:

7.JPG

If(_submittingRequest,
    Concurrent(
        Set(_navMenuSelect, ""), 
        ...
        ...
        ...
    //Modify formula below. Please Type _selectedApprover.Mail rather than _myProfile.UserPrincipalName
    Office365.SendEmailV2(_selectedApprover.Mail, "New Leave Request", First(EmailTemplate).Value, {Importance: "Normal"});
    Concurrent(
        Set(_submittingRequest, false),
        Set(_leaveStart, Today()),
        Set(_leaveEnd, Today()),
        Set(_leaveTitle, ""),
        ...
        ...
...
...

 

Please consider take a try with above solution, check if the issue is solved.

 

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.

Hi 

 

 

 

 

Hi @itsupport ,

Do you mean there is no variable called "_selectedApprover" variable within your template app?

 

Based on the issue that you mentioned, I do not have the issue that you mentioned. The "_selectedApprover" variable is initialized within the OnVisible property of the LoginScreen as below:

1.JPG

 

Please check if you have initialized a global variable called "_selectedApprover" within the OnVisible property of the LoginScreen as above. If not, please set a global variable called "_selectedApprover" within the OnVisible property of the LoginScreen, then re-load your app, then check if the issue is solved.

 

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.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,518)