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 / Patch Sharepoint "Pers...
Power Apps
Unanswered

Patch Sharepoint "Person or Group" column with Office365 list from Combo Box

(0) ShareShare
ReportReport
Posted on by
I am trying to Patch a Sharepoint "Person or Group" column with Office365 Users from Combo Box.
 
The Combo Box "Items" code is as follows and works to search Users from the Office 365 connector:
Filter(Office365Users.SearchUserV2(
{
searchTerm:Trim(Self.SearchText),
isSearchTermRequired:false
}
).value,AccountEnabled=Not("#EXT" in UserPrincipalName
))
 
DefaultSelectedItems =
It is blank
 
My Patch function is as follows but does not work. Specifically the Combo box is causing the error:
Patch('Front Desk Messages',
Defaults('Front Desk Messages'),
{
Title:txt_ContactName.Text,
'OSARC Contact':cmb_OSARC.Selected.DisplayName,
'Contact Date':Date_Contact.SelectedDate,
'Contact Time':txt_ContactTime.Text,
'Contact Phone No':txt_ContactNumber.Text,
'Contact Email':txt_ContactEmail.Text,
'Contact Message':txt_ContactMessage.Text
}
);
Reset(txt_ContactName);
Reset(cmb_OSARC);
Reset(Date_Contact);
Reset(txt_ContactTime);
Reset(txt_ContactNumber);
Reset(txt_ContactEmail);
Reset(txt_ContactMessage)
 
I also attached another patch function that I have tried.  Nothing seems to work. 
Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @jchammons ,

     

    Please try this

    vxiaochenmsft_0-1707362933851.png

     

    Best Regards,

    Wearsky

  • jchammons Profile Picture
    on at

    No luck with anything I do. See attached and below code. 


    Patch('Front Desk Messages',
        Defaults('Front Desk Messages'),
        {
             Title:txt_ContactName.Text,
                     'OSARC Contact':
                {
                Claims:"i:0#.f|membership|" &  Lower(cmb_OSARC.Selected.Mail),
                Department: "",
                DisplayName: cmb_OSARC.Selected.DisplayName,
                Email: cmb_OSARC.Selected.Mail,
                JobTitle: "",
                Picture: ""
                },
            'Contact Date':Date_Contact.SelectedDate,
            'Contact Time':txt_ContactTime.Text,
            'Contact Phone No':txt_ContactNumber.Text,
            'Contact Email':txt_ContactEmail.Text,
            'Contact Message':txt_ContactMessage.Text
        }
    );


            Reset(txt_ContactName);
            Reset(cmb_OSARC);
            Reset(Date_Contact);
            Reset(txt_ContactTime);
            Reset(txt_ContactNumber);
            Reset(txt_ContactEmail);
            Reset(txt_ContactMessage)
  • jchammons Profile Picture
    on at

    Figured it out. For some reason, nothing likes the this part of the patch. Seems to not recognize the ".Mail" part.

    Email: cmb_OSARC.Selected.Mail

     

    Also I turned it into a "TABLE". It patches the Sharepoint Column and also my PowerAutomate works as well. The PowerAutomate sends an email to the person selected in the Combo Box.

     

    Patch('Front Desk Messages',

        Defaults('Front Desk Messages'),

        {

            Title:txt_ContactName.Text,

            'OSARC Contact':

                Table(

                    {

                Claims:"i:0#.f|membership|" & Lower(cmb_OSARC.Selected.DisplayName),

                Department: "",

                DisplayName: cmb_OSARC.Selected.DisplayName,

                Email: cmb_OSARC.Selected.DisplayName,

                JobTitle: "",

                Picture: ""

                    }

                ),

            'Contact Date':Date_Contact.SelectedDate,

            'Contact Time':txt_ContactTime.Text,

            'Contact Phone No':txt_ContactNumber.Text,

            'Contact Email':txt_ContactEmail.Text,

            'Contact Message':txt_ContactMessage.Text

        }

    );

            Reset(txt_ContactName);

            Reset(cmb_OSARC);

            Reset(Date_Contact);

            Reset(txt_ContactTime);

            Reset(txt_ContactNumber);

            Reset(txt_ContactEmail);

            Reset(txt_ContactMessage)

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard