Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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. 
  • jchammons Profile Picture
    on at
    Re: Patch Sharepoint "Person or Group" column with Office365 list from Combo Box

    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)

  • jchammons Profile Picture
    on at
    Re: Patch Sharepoint "Person or Group" column with Office365 list from Combo Box

    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)
  • v-xiaochen-msft Profile Picture
    on at
    Re: Patch Sharepoint "Person or Group" column with Office365 list from Combo Box

    Hi @jchammons ,

     

    Please try this

    vxiaochenmsft_0-1707362933851.png

     

    Best Regards,

    Wearsky

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard