cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Officer 365 connector giving error while automatically saving data in text box

Hi,

 

I have a people picker (dropdown) in a form which helps to select the employee name and saves the data in Sharepoint.

We have another field called employee ID which I am trying to autopopulate in text box based on the value selected in people picker (dropdown).

 

I used below formula to set the default value of the Employee ID text box

 

If(IsBlank(DataCardValue1.Selected.DisplayName),Left( Office365Users.UserProfile(User().Email).UserPrincipalName,6), Left(Office365Users.UserProfile(DataCardValue1.Selected.Email).UserPrincipalName,6))

 

but getting a 404 error please help !!

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

Try rewriting the formula but this time use UserProfileV2()

If(
	IsBlank(DataCardValue1.Selected.DisplayName),
	Left(
		Office365Users.UserProfileV2(User().Email).userPrincipalName,
		6
	),
	Left(
		Office365Users.UserProfileV2(DataCardValue1.Selected.Email).userPrincipalName,
		6
	)
)

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Jeff_Thorpe
Super User
Super User

Try rewriting the formula but this time use UserProfileV2()

If(
	IsBlank(DataCardValue1.Selected.DisplayName),
	Left(
		Office365Users.UserProfileV2(User().Email).userPrincipalName,
		6
	),
	Left(
		Office365Users.UserProfileV2(DataCardValue1.Selected.Email).userPrincipalName,
		6
	)
)

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

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 (3,645)