cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dB4
Helper III
Helper III

PowerApps - Leave Request

G'day.

I'm using the Leave Request template with a few adjustments on the text, not on the source code.

Im getting the attached error on the employee/manager login screen.

Office365Users.UserPhotoMetadata failed: The method 'UserPhotoMetadata' has an invalid value for parameter 'userId'

 Also,

How can i Edit the notification email that the PowerApp generates and sends to Manager once a leave request is submitted?

 

9 REPLIES 9
ganeshsanap
Memorable Member
Memorable Member

@dB4, I think you are either passing a wrong or blank parameter/variable to UserPhotoMetadata method. This method expects User principal name or email id. So make sure you are passing correct parameter to this method.

Get user photo metadata 

 

As you are using Leave Request template, you need to edit the email template at two places:

  • OnStart property of the App and
  • OnVisible property of the ConfirmationScreen

Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it 👍

Hello @ganeshsanap 

The parameters are default.

Havent edited anything with regards to User photo.

@dB4, I saw your other post on this forum. Where you don't have manager assigned to the user in Azure AD. So, it is returning blank values. Can you please check and make sure that you are not passing any blank values to this method? 

Also, if you are not passing any blank values then make sure you are passing the user principal name or email id correctly. You can check the current variable values from View --> Variables.


Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it 👍

@dB4 Have you resolved this issue or you are still facing any problem?

Good day @ganeshsanap 

 

Issue resolved once i uploaded a profile picture.

@dB4 Great, Please Accept my above appropriate response as solution if it helped you solve your issue. This will help others find the correct solution easily. It also closes the item. Thanks.

Dear @ganeshsanap 

 

I have a couple of questions reg. Leave requests.

1) I'm making some tests before deployment, and i found out that a User can apply for a Leave for more days than his available. Is this fixable?

2) App will be used by whole Org, about 300~350 users, i see that the Flow after applying the request, sends an email through Applicant's account (Email address) which means User=License. Can we somehow edit the sending email account to a general licensed account?

 

Your assistance is highly appreciated.

Tks

E.

@dB4 

  1. Yes, with some validations you can check the number of leaves available and number of days users applying for leaves and notify user that leaves are not available.
  2. If you are using Microsoft flow to send email then you can use From/Send as property in send an email action in outlook connector to replace the current user email with any other user email.

Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it 👍

 

Thx for your prompt reply @ganeshsanap 

 

1) Can you elaborate with further details?

2) No, i'm using the integrated flow of the template, from the Confirmation page, on the OnVisible part.

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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