cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Using a Combobox multiple select to PATCH email address to a person column

Hello,

 

I have a combobox which has a list of, Office356Users, and what I would like is for my users to select multiple email addresses or groups and to PATCH them to my SharePoint list under 'Email Reminders' which is a Persons or Group column (multiple select enabled).

 

I though it would just be a case of using 'cbox_Add_Email.Selected.Value' but that's not working.

 

Any help would be appreciated.

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
StretchFredrik
Super User
Super User

Like this should work:

 

Patch(
    'Calendar Events',
    Table(
        {
            ID: varCurrentEvent.ID,
            Title: txt_Add_Title.Text,
            'Start Date': date_Add_Start_Date.SelectedDate,
            'Start Time':drp_Add_Start_Time.Selected.Value,
            'End Date': date_Add_End_Date.SelectedDate,
            'End Time': drp_Add_End_Time.Selected.Value,
            'All Day': cbox_Add_All_Day.Value,            
            'Make Recurring': cbox_Add_Recurring.Value,
            'Recur Every': txt_Add_RepeatDays.Text,
            'Recur Frequency': drp_Add_Frequency.SelectedText,
            'End Recurrence': radio_Add_End.Selected.Value,
            Description: txt_Add_Description.Text,
            'Create Reminder': cbox_Add_Reminder.Value,
            Category: cbox_Add_Category.Selected,
            'Email Reminder': {
        DisplayName: cbox_Add_Email_Address.SelectedItems.FullName;
        Claims: "i:0#.f|membership|" & cbox_Add_Email_Address.SelectedItems.Mail;
        Department: "";
        Email: cbox_Add_Email_Address.SelectedItems.Mail;
        JobTitle:"";
        Picture:""
    } 
        }
    )
);

View solution in original post

4 REPLIES 4
StretchFredrik
Super User
Super User

A person column expects the following format:

{
        DisplayName: User().FullName;
        Claims: "i:0#.f|membership|" & User().Email;
        Department: "";
        Email: User().Email;
        JobTitle:"";
        Picture:User().Image
    }

Thank you, I'v seen this online however not quite sure how to implement it into the Patch function. 

 

Here is my PATCH code, how would I make it so it would do that Person column requirements?

Patch(
    'Calendar Events',
    Table(
        {
            ID: varCurrentEvent.ID,
            Title: txt_Add_Title.Text,
            'Start Date': date_Add_Start_Date.SelectedDate,
            'Start Time':drp_Add_Start_Time.Selected.Value,
            'End Date': date_Add_End_Date.SelectedDate,
            'End Time': drp_Add_End_Time.Selected.Value,
            'All Day': cbox_Add_All_Day.Value,            
            'Make Recurring': cbox_Add_Recurring.Value,
            'Recur Every': txt_Add_RepeatDays.Text,
            'Recur Frequency': drp_Add_Frequency.SelectedText,
            'End Recurrence': radio_Add_End.Selected.Value,
            Description: txt_Add_Description.Text,
            'Create Reminder': cbox_Add_Reminder.Value,
            Category: cbox_Add_Category.Selected,
            'Email Reminder': cbox_Add_Email_Address.SelectedItems.Mail //This is the persons column
        }
    )
);
StretchFredrik
Super User
Super User

Like this should work:

 

Patch(
    'Calendar Events',
    Table(
        {
            ID: varCurrentEvent.ID,
            Title: txt_Add_Title.Text,
            'Start Date': date_Add_Start_Date.SelectedDate,
            'Start Time':drp_Add_Start_Time.Selected.Value,
            'End Date': date_Add_End_Date.SelectedDate,
            'End Time': drp_Add_End_Time.Selected.Value,
            'All Day': cbox_Add_All_Day.Value,            
            'Make Recurring': cbox_Add_Recurring.Value,
            'Recur Every': txt_Add_RepeatDays.Text,
            'Recur Frequency': drp_Add_Frequency.SelectedText,
            'End Recurrence': radio_Add_End.Selected.Value,
            Description: txt_Add_Description.Text,
            'Create Reminder': cbox_Add_Reminder.Value,
            Category: cbox_Add_Category.Selected,
            'Email Reminder': {
        DisplayName: cbox_Add_Email_Address.SelectedItems.FullName;
        Claims: "i:0#.f|membership|" & cbox_Add_Email_Address.SelectedItems.Mail;
        Department: "";
        Email: cbox_Add_Email_Address.SelectedItems.Mail;
        JobTitle:"";
        Picture:""
    } 
        }
    )
);

Oh I see just like that!

 

Thank you very much

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,894)