cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Resident Rockstar
Resident Rockstar

Re: Leave Request App issue

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

 

Thanks

Highlighted
Regular Visitor

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

Highlighted
Resident Rockstar
Resident Rockstar

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.

Highlighted
Resident Rockstar
Resident Rockstar

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

Highlighted
Community Support
Community Support

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.
Highlighted
Regular Visitor

Re: Leave Request App issue

Hi 

 

 

 

 

Highlighted
Community Support
Community Support

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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