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
Microsoft
Microsoft

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

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
Microsoft
Microsoft

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

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

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

Thanks @RusselThomas!

 

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

 

Many thanks,

 

TR

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (947)