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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery - Patch Person...
Power Apps
Suggested Answer

Gallery - Patch Person Type column in Combo box

(0) ShareShare
ReportReport
Posted on by 138
 
Good Day!! Need help
 
This issue remains for couple of days as am trying to patch Person Type column in Combo box where this was located in a Gallery
 
I have a SharePoint List " ContractRegister" and having a Gallery to display the details of the Task and approver name. 
While click on Save button all the fields are patching except the "Preapprover Name" column. Refer the below screenshot.
 
 
 
 
 
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    To patch a person/group column with an entry from a combobox you need to put the entry in the patch in the form of a record.  Something like this for your Preapprover column
     
    Patch(
             ContractRegister,
            ShowColumns(colGridUpdates,Title,RiverbankRefandCriteria, CustomerContract, ApprovalStatus),{'Preapprover Name': <<dropdown>>.selected});

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • FatihDagdelen Profile Picture
    53 on at
    I totaly agree with @Pstork1 and try to explain with more details.
     

    Your issue likely arises because the "Preapprover Name" column is a Person or Group type, and it is not being provided in the correct format for the Patch function.

    To update such columns, you need to provide a record object to the Patch function. You can modify your code as follows:

    Solution Proposal

    Patch(
        ContractRegister,
        ShowColumns(colGridUpdates, Title, RiverbankRefandCriteria, CustomerContract, ApprovalStatus, ContractLookup, ID),
        {'Preapprover Name': LookUp(Users, DisplayName = cmbPreapprover.Selected.DisplayName)}
    );


     

    Explanation:

    1. Since Preapprover Name is a Person or Group column, it cannot accept a plain text value. It must be provided as a record.
    2. cmbPreapprover.Selected might not directly return a user record. Therefore, we use LookUp(Users, DisplayName = cmbPreapprover.Selected.DisplayName) to retrieve the correct user record.
    3. Users should be either a SharePoint list or an Office 365 Users connector.

    If the above code does not work and your Users data source is unavailable, try the following alternative:
    Patch(
        ContractRegister,
        ShowColumns(colGridUpdates, Title, RiverbankRefandCriteria, CustomerContract, ApprovalStatus, ContractLookup, ID),
        {'Preapprover Name': { '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                               'Claims': "i:0#.f|membership|" & Lower(cmbPreapprover.Selected.Email),
                               'DisplayName': cmbPreapprover.Selected.DisplayName,
                               'Email': cmbPreapprover.Selected.Email }
        }
    );

     

    When to use this alternative:

    • If Preapprover Name is a Person or Group field in a SharePoint list,
    • And the selected user is an Office 365 User.

    You can test this solution and let me know if it resolves your issue. 😊

  • schithambaran Profile Picture
    138 on at
    Thank you so much for the response
     
    but the error shows that "Invalid argument type (Table). Expecting a Record value instead. we are nearing to the solution, appreciate your support/.
     
     
     
  • schithambaran Profile Picture
    138 on at
     
    Thank you so much for your response.
    Updated the coding as per the below , but an error receiving that "Invalid argument type (Table). Expecting a Record value instead". Appreciate your intervention.
     
    Patch(
             ContractRegister,
            ShowColumns(colGridUpdates,Title,RiverbankRefandCriteria, CustomerContract, ApprovalStatus, ContractLookup, ID),{PreApproverName: drpPreapproverName.Selected});
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard