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

Data Card to copy input from other Data Card in Edit From

Hi,

 

This might be trivial, but I'm having difficulties.

My app is connected to a SharePoint list that contains three person/group fields titled "Employee", "Title" and "Department" - they're basically the same: they take a name/email as an input but display the name, title or department.

In the app, it is necessary for the user to input the same employee in all three fields.

Is it possible to make "Title/Role" and "Department" data cards copy the input from "Employee" so users don't have to manually input the same employee into each?

 

Here's a pic of my current Edit Form:

Capture.PNG

 

 

 

 

 

 

 

 

 

 

Thanks.

 

T

1 ACCEPTED SOLUTION

Accepted Solutions
RusselThomas
Microsoft
Microsoft

Hi t_R,

  

It is possible, but I'm not sure why you're using three separate person columns - so it complicates the answer a bit.

 

If it was me, I'd use just one person column to select the person, you can then use normal text columns to store the jobtitle and department values...I assume you need these for something else, but the point is, they're always available as part of the person profile, so as long as you have someone's email address or person object, they will be available to you.

 

By way of illustration, let's assume your Employee dropdown is called "EmployeeDropDown".

Pop a couple of text labels onto your screen - one for Title, one for Department (doesn't matter where, just to show you how this works)

 

You can then set the Text properties of the Title label as;

EmployeeDropDown.Selected.JobTitle

and the Text property of the Department label as;

EmployeeDropDown.Selected.Department

 

 

If you have to have all three columns as Person columns, then changing the DisplayFields property and the Default property of the other two dropdowns should address your need;

 

Default value for both second and third DropDowns:

EmployeeDropDown.Selected

TitleDropDown DisplayFields property:

["JobTitle"]

DepartmentDropDown DisplayFields property:

["Department"]

Once you do this, you might realise that having dropdowns for these fields in the form becomes redundant and unintuitive, so while the above might work, there's possibly a better way to go about it.  

 

For my apps, I avoid person columns in SharePoint, mainly because it sometimes creates complexity in PowerApps (potential delegation issues when filtering on person and complicated formulas outside of the standard Edit form when saving back to SharePoint, for example with Patch() functions).  Anyway, that's personal preference 🙂

 

I generally just keep the users email address as a plain text in SharePoint - when I need additional profile info, I use the Office365Users connector to get everything I need using the email address as the userid, such as Full Name, Manager, Department etc.  

If, for some reason, you still want to store Title and Department separately in SharePoint, I'd still use plain text columns and just save the values from the profile I fetched back there as plain text - unless there's a good reason for having all three columns as person columns of course 🙂

 

Hope this helps,


RT

 

View solution in original post

2 REPLIES 2
RusselThomas
Microsoft
Microsoft

Hi t_R,

  

It is possible, but I'm not sure why you're using three separate person columns - so it complicates the answer a bit.

 

If it was me, I'd use just one person column to select the person, you can then use normal text columns to store the jobtitle and department values...I assume you need these for something else, but the point is, they're always available as part of the person profile, so as long as you have someone's email address or person object, they will be available to you.

 

By way of illustration, let's assume your Employee dropdown is called "EmployeeDropDown".

Pop a couple of text labels onto your screen - one for Title, one for Department (doesn't matter where, just to show you how this works)

 

You can then set the Text properties of the Title label as;

EmployeeDropDown.Selected.JobTitle

and the Text property of the Department label as;

EmployeeDropDown.Selected.Department

 

 

If you have to have all three columns as Person columns, then changing the DisplayFields property and the Default property of the other two dropdowns should address your need;

 

Default value for both second and third DropDowns:

EmployeeDropDown.Selected

TitleDropDown DisplayFields property:

["JobTitle"]

DepartmentDropDown DisplayFields property:

["Department"]

Once you do this, you might realise that having dropdowns for these fields in the form becomes redundant and unintuitive, so while the above might work, there's possibly a better way to go about it.  

 

For my apps, I avoid person columns in SharePoint, mainly because it sometimes creates complexity in PowerApps (potential delegation issues when filtering on person and complicated formulas outside of the standard Edit form when saving back to SharePoint, for example with Patch() functions).  Anyway, that's personal preference 🙂

 

I generally just keep the users email address as a plain text in SharePoint - when I need additional profile info, I use the Office365Users connector to get everything I need using the email address as the userid, such as Full Name, Manager, Department etc.  

If, for some reason, you still want to store Title and Department separately in SharePoint, I'd still use plain text columns and just save the values from the profile I fetched back there as plain text - unless there's a good reason for having all three columns as person columns of course 🙂

 

Hope this helps,


RT

 

View solution in original post

Anonymous
Not applicable

Thanks @RusselThomas!

 

This helped a lot. I felt like three separate columns were unnecessary and this proved it.

 

Many thanks,

 

TR

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,700)