cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft Employee

Sharepoint List Form: Using one "Person or Group" field and capturing both Name and Email

Hello,

 

I'm building a powerapp form from a Sharepoint list.  In my Sharepoint list I have a "Person or Group" field called "Employee Name" with the value set to "DisplayName" on my powerapp form.  I have another Text Field on my Sharepoint list called "Employee Email".  What I'm trying to figure out how to do with powerapp is have the user enter the "Employee Name" on the form and have the "Employee Email" automattically populated with the "Employee Name" "Email" value so when the form is submitted both data points are captured on my Sharepoint list.  Is this possible?  I want my Sharepoint list to capture Employee Name and Employee Email but I want my user to only have to enter the employees name when completing the form.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Sharepoint List Form: Using one "Person or Group" field and capturing both Name and Em

Hi @rcope,

 

Thanks for the update and feedback.

The symptom could be re-produced from my side. It seems that PowerApps will not always do good with the People column (with value2).

Let's try the following:

1. Under the Editform (Third screen here ), change the People column with Value1 set to Email, Value2 set to Display Name,

2. Change the Email Text Box property with the code below, also change the Email DataCard Update property with the same:

DataCardValue10.Selected.Value

After that, check to see if this time would make the Create New Record work.

Regards

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Community Support Team
Community Support Team

Re: Sharepoint List Form: Using one "Person or Group" field and capturing both Name and Em

Hi @rcope,

 

Yes, this is possible.

Actually the People column should contain the Email information.

We could reference the Email information through (People.Email).

So here you are refering to the Editfom?

Edit form and Display form controls in PowerApps

Let's take the auto-generated SharePoint list app as an example:

The third screen is built with an Editform control, the key properties configured for this editform control are the following:

 

DataSource: "SharePointlistname"

Item            : BrowseGallery1.Selected

With those value, the editform would be able to work with single record,

Then we choose the People column datacard (DataCard control reference), on the right side, Under Options, click on the three dots besides the People column, you should be able to modify the Value, change the second one with the Email value, please keep a note for the datacardvalue10 for the dropdown in People column value, we will use it later,

47.PNG

 

 

 

Then we need to customize the Email (SText here) DataCard, choose this datacard, on the right side, click Advanced to unlock this datacard, delete the Textinput box, then add a Text Box, change the Text Box Text property with the following formula:

Text = DataCardValue10.Selected.Value2

49.PNG

After that,  we need to modify the Email (STest here) DataCard Update property, with the same formula:

Update = DataCardValue10.Selected.Value2

48.PNG

Doing it in this way should make it available to only select the People column, and then update the People and Email column to SharePoint list when submit this Editform.

If you need any further assistance, please post back.

Regards

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Microsoft Employee

Re: Sharepoint List Form: Using one "Person or Group" field and capturing both Name and Em

Hi @v-micsh-msft,

 

Thank you for getting back to me on this!  I was able to follow your instructions and have this working when I edit a previously submitted record in my database, but how about when submitting a new form?  When the form is in NewForm mode it doesn't populate the Email textbox after a person has been entered in People or when the NewForm is submitted.  I want to capture both on new submissions to my database.  Thanks!

Community Support Team
Community Support Team

Re: Sharepoint List Form: Using one "Person or Group" field and capturing both Name and Em

Hi @rcope,

 

Thanks for the update and feedback.

The symptom could be re-produced from my side. It seems that PowerApps will not always do good with the People column (with value2).

Let's try the following:

1. Under the Editform (Third screen here ), change the People column with Value1 set to Email, Value2 set to Display Name,

2. Change the Email Text Box property with the code below, also change the Email DataCard Update property with the same:

DataCardValue10.Selected.Value

After that, check to see if this time would make the Create New Record work.

Regards

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Microsoft Employee

Re: Sharepoint List Form: Using one "Person or Group" field and capturing both Name and Em

Hi @v-micsh-msft,

 

Thank you for getting back to me so quickly!  My sharepoint site is now capturing the employees name and email address since I have the employee name on my sharepoint site set to DisplayName!  But, now on my powerapp form, the field to enter the employees name, once selected shows the employees email address instead of their name in that field in the app.  I have DisplayFields set to 2 so you can see the employees name while searching for who you want to pick since most my employees won't know the email address ofthe employee they are selecting.  Is there a way to show the employee name (DisplayName) in the employee name field once one has been picked after searching? 

Community Support Team
Community Support Team

Re: Sharepoint List Form: Using one "Person or Group" field and capturing both Name and Em

Hi @rcope,

 

If saving emailaddress is needed for the Text Box, then currently I don't have any idea to show the displayname for the People column with the dropdown control.

I will discuss this with the others, for the Value1, value2 usage, I will post back if I have any helpful feedback.

Regards

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Himanjan
Level: Power Up

Re: Sharepoint List Form: Using one "Person or Group" field and capturing both Name and Em

Hi, can we add multiple people names in powerapps, please let me know?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 244 members 2,327 guests
Please welcome our newest community members: