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:
Thanks.
T
Solved! Go to Solution.
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
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
Thanks @RusselThomas!
This helped a lot. I felt like three separate columns were unnecessary and this proved it.
Many thanks,
TR
User | Count |
---|---|
255 | |
112 | |
92 | |
48 | |
38 |