cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
itsupport
Level: Powered On

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
EricLott
Level 10

Re: Leave Request App issue

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

 

Thanks

itsupport
Level: Powered On

Re: Leave Request App issue

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

EricLott
Level 10

Re: Leave Request App issue

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.

Eelman
Level 10

Re: Leave Request App issue

@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 Team
Community Support Team

Re: Leave Request App issue

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.
itsupport
Level: Powered On

Re: Leave Request App issue

Hi 

 

 

 

 

Community Support Team
Community Support Team

Re: Leave Request App issue

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
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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