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 / unable to patch person...
Power Apps
Answered

unable to patch person or group type column to SharePoint list

(0) ShareShare
ReportReport
Posted on by 39
Hi,

I’m currently facing an issue with patching the “Person or group” type column to a SharePoint list. The code seems to be correct, but the patching isn’t working for this column. Here is my code:
 
If(
    varFormMode = FormMode.Edit,
    SubmitForm(Form1)
);
If(
    varFormMode = FormMode.New,
    Patch(
        DMAT,
        Defaults(DMAT),
        {
            Custodians: {
                Claims: Concatenate(
                    "i:0#.f|membership|",
                    DataCardValue28.Selected.Mail
                ),
                Department: "",
                DisplayName: DataCardValue28.Selected.DisplayName,
                Email: DataCardValue28.Selected.Mail,
                JobTitle: "",
                Picture: ""
            },
            MWC: {
                Claims: Concatenate(
                    "i:0#.f|membership|",
                    DataCardValue82.Selected.Mail
                ),
                Department: "",
                DisplayName: DataCardValue82.Selected.DisplayName,
                Email: DataCardValue82.Selected.Mail,
                JobTitle: "",
                Picture: ""
            },
            Plant: DataCardValue41.Selected,
            'Item Description': DataCardValue30.Value,
            Brand: DataCardValue20.Value,
            Model: DataCardValue21.Value,
            Healthiness: DataCardValue29.Selected,
            'Serial number': DataCardValue42.Value,
            'Asset Type': DataCardValue32.Selected,
            Category: DataCardValue36.Selected,
            'Equipment Condition': DataCardValue37.Selected,
            'Equipment Status': DataCardValue38.Selected,
            'Assets Owner': DataCardValue85.Selected,
            'Frequency of Calibration': DataCardValue39.Selected,
            'Tolerance or Accuracy': DataCardValue70.Value,
            NFCTag: DataCardValue40.Value,
            'Device Photo': Image2.Image,
            'Purchase date': DataCardValue26.SelectedDate,
            'Calibration Expiry Date': DataCardValue35.SelectedDate,
            'Asset Number': Value(DataCardValue31.Value),
            'Value RM': Value(DataCardValue27.Value),
            'Test Equipment': DataCardValue43.Checked
        }
    );
    Patch(
        DMAT,
        LookUp(
            DMAT,
            ID = Value(DataCardValue88.Value)
        ),
        {}
    ),Form1.Updates
);
If(
    Form1.Error,
    Notify(
        "There was an error saving the data.",
        NotificationType.Error
    ),
    Navigate(
        Scr_ToolsAssets,
        ScreenTransition.None
    )
)
 
I appreciate your help.
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,529 Most Valuable Professional on at
    I assume that both are single selection Person fields ? If so (using whichever one  is not working), put this on a Label and see if the expected values are visible
    "Name: - " & DataCardValue28.Selected.DisplayName & "Email: - " & DataCardValue28.Selected.Mail

    I am also assuming that the Items of both Combo Boxes are based on Office365Users.SearchUser or the V2 version.
  • Khairul_Amri Profile Picture
    39 on at
    its working on one column, the other one not working, is it possible I'm missing the setting of this column?
  • WarrenBelz Profile Picture
    153,529 Most Valuable Professional on at
    Firstly try adding this
    If(
       varFormMode = FormMode.Edit,
       SubmitForm(Form1)
       varFormMode = FormMode.New,
       Patch(
          DMAT,
          Defaults(DMAT),
          {
             Custodians: 
             {
                Claims: "i:0#.f|membership|" & Lower(DataCardValue28.Selected.Mail),
                Department: "",
                DisplayName: DataCardValue28.Selected.DisplayName,
                Email: DataCardValue28.Selected.Mail,
                JobTitle: "",
                Picture: ""
             },
             MWC: 
             {
                Claims: "i:0#.f|membership|" & Lower(DataCardValue82.Selected.Mail),
                Department: "",
                DisplayName: DataCardValue82.Selected.DisplayName,
                Email: DataCardValue82.Selected.Mail,
                JobTitle: "",
                Picture: ""
             },
             Plant: DataCardValue41.Selected,
             'Item Description': DataCardValue30.Value,
             Brand: DataCardValue20.Value,
             Model: DataCardValue21.Value,
             Healthiness: DataCardValue29.Selected,
             'Serial number': DataCardValue42.Value,
             'Asset Type': DataCardValue32.Selected,
             Category: DataCardValue36.Selected,
             'Equipment Condition': DataCardValue37.Selected,
             'Equipment Status': DataCardValue38.Selected,
             'Assets Owner': DataCardValue85.Selected,
             'Frequency of Calibration': DataCardValue39.Selected,
             'Tolerance or Accuracy': DataCardValue70.Value,
             NFCTag: DataCardValue40.Value,
             'Device Photo': Image2.Image,
             'Purchase date': DataCardValue26.SelectedDate,
             'Calibration Expiry Date': DataCardValue35.SelectedDate,
             'Asset Number': Value(DataCardValue31.Value),
             'Value RM': Value(DataCardValue27.Value),
             'Test Equipment': DataCardValue43.Checked
          }
       );
       Patch(
          DMAT,
          LookUp(
             DMAT,
             ID = Value(DataCardValue88.Value)
          ),
          Form1.Updates
       )
    );
    If(
       Form1.Error,
       Notify(
          "There was an error saving the data.",
          NotificationType.Error
       ),
       Navigate(
          Scr_ToolsAssets,
          ScreenTransition.None
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • Khairul_Amri Profile Picture
    39 on at
    Sorry, I'm not familiar with the person or group type column. what do you mean by usual suspects?
  • Khairul_Amri Profile Picture
    39 on at
    I'm disable multiple selection.
  • MiDer Profile Picture
    139 on at
    Have you ruled out the usual suspects already?
    Is the people picker column of type single or multi select?
     

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
Kalathiya Profile Picture

Kalathiya 428

#2
WarrenBelz Profile Picture

WarrenBelz 374 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 333 Super User 2025 Season 2

Last 30 days Overall leaderboard