web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Person type dependent ...
Power Apps
Answered

Person type dependent drop-down (SharePoint)

(0) ShareShare
ReportReport
Posted on by 7

Hi

I have created a form where multiple fields are filled automatically based on a selection. Other fields are working just fine but person type data won't update to a SharePoint list. I wonder what's wrong?

Details:

1. User chooses an action from a drop-down "ActionDropdown" (Distinct data from a field in the source SharePoint list "Actions")

2. Multiple dependent drop-downs are automatically filled based on the selected Action (data from columns in source SP list "Actions"). I have added drop-downs to the DataCards (thanks to @RezaDorrani for instructions, https://www.youtube.com/watch?v=Qzpjq008cBY) and used the following code for Items:

Distinct(Filter(Actions; Action = ActionDropdown.Selected.Result);RelevantColumn) if the relevant column is text type
Distinct(Filter(Actions; Action = ActionDropdown.Selected.Result);RelevantColumn.Value) if the relevant column is choice type
Distinct(Filter(Actions; Action = ActionDropdown.Selected.Result);RelevantColumn.DisplayName) if the relevant column is person type (SharePoint settings for the column: no groups allowed, all users)

3. Finally, when the user submits the form, the data will be updated to another target SharePoint list "Reports" where I have corresponding columns with same data types (text, choice or person). For Update of DataCards I have the following code:


RelevantDropdown.Selected.Result if the relevant column is text type
RelevantDropdown.SelectedText if the relevant column is choice type
RelevantDropdown.Selected if the relevant column is person type

I don't get any errors but only the text and choice columns will update correctly to the target SharePoint list "Reports" while the person column won't update. I have also tried to set the target column as text or choice type instead of person type in the target "Reports" list while keeping the source column as person type in the source "Actions" list. I only need to get the DisplayName into the target column (could be text type) but wouldn't mind if the entire record as a person type gets copied. However, I need to keep the source column as person type.

Categories:
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Tpide,

    You should format a person field in the update property as below:

    {
     Claims: First(Office365Users.SearchUser({searchTerm: RelevantDropdown.Selected.Result})).Mail,
     Department:"",
     DisplayName:First(Office365Users.SearchUser({searchTerm: RelevantDropdown.Selected.Result})).DisplayName,
     Email:First(Office365Users.SearchUser({searchTerm: RelevantDropdown.Selected.Result})).Mail,
     JobTitle:"",
     Picture:""
     }

     

  • Tpide Profile Picture
    7 on at

    Thank you @v-qiaqi-msft, I think your code is right but the overall solution still lacks something: I get the error message "SearchUser is unknown or unsupported function in namespace Office365Users". I have added Office365Users as a connector. It is not the direct data source for the form or the drop-down though: the form updates the SharePoint list "Reports" where I have a person type column "Person in charge", while the drop-down gets it's dependent value from the person type "Person in charge" column of the "Actions" list based on the "Action" selection of another drop-down. Is there a workaround?

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Tpide,

    I want to clarify that Office365Users() shares the same users with those in Person column from SPO list, so it makes no sense to compare the direct data source with the Office365Users(). 

     

    Please do add the Office365Users as the connector because I have the same error with you when I dont connect it to my canvas app.

     

    vqiaqimsft_1-1667468105582.png

    vqiaqimsft_2-1667468214387.png

     

  • Tpide Profile Picture
    7 on at

    Thanks again @v-qiaqi-msft, I got it running! There was a regional issue which caused the error (using non-English version, had to add ' to the code). Also, I had to recreate the whole app - my old app wouldn't update the person column of the SharePoint list even with all the right settings but the new copy runs just fine.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard