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

Retrieve office365 user email issue

Hi, 

 

I would like to get the applicant's email address, which was a value of Office365Users.

Form1.LastSubmit.applicant is fine to return it's name, but

Form1.LastSubmit.applicant.email is failed to return it's email address

 

I also tried the 

Office365Users.UserProfile(Form1.LastSubmit.applicant).Mail

but it returned error as shown below

 

May I know how can I retrieve the email there?

Q24a.PNGQ24b.PNGQ24c.PNG

 

 

Thanks in advance

Sam

2 REPLIES 2
Community Support Team
Community Support Team

Re: Retrieve office365 user email issue

Hi @samsam ,

Could you tell me

1)the data type of applicant field?

2)the Update property of this data card?

I assume that it is a single person field.

Please set the datacard's Update:

{'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
  Claims:"i:0#.f|membership|" & ComboBox1.Selected.Email),
  Department:"",
  DisplayName:ComboBox1.Selected.DisplayName,
  Email:ComboBox1.Selected.Email,
  JobTitle:".",
  Picture:"."}

you could get mail by using this formula:

Form1.LastSubmit.applicant.Email

or you could also use:

Office365Users.UserProfile_V2(Form1.LastSubmit.applicant.DisplayName).Mail

//UserProfile action has been deprecated. Please use Get user profile (V2) instead.

Please know more about person field's structure and these two functions' results' structure.

Here are docs about these for your reference:

https://docs.microsoft.com/en-us/connectors/officeusers/#array-of-user

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Update-SharePoint-Person-type-colum...

 

 

 

Best regards,

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
samsam
Level: Powered On

Re: Retrieve office365 user email issue

@v-yutliu-msft  Thanks for the reply

 

Sorry that I didn't mention the database is MSSQL, and datatype is VARCHAR(50)

I have no idea is there any syntax difference between MSSQL and SharePoint List...

 

I tried 

 

Office365Users.UserProfile_V2(Form1.LastSubmit.applicant. (<<< after that, no attribute popup)

 

 

However, I found another way that work perfectly for me

 

UpdateContext({vEmail:ComboBox1.Selected.Mail});SubmitForm(Form1);Navigate(Screen2);'DB-ClaimApplication'.Run(Form1.LastSubmit.applicant,vEmail)

 

 

Thanks for the help

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 (9,043)