cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mmattar
Level 8

ForAll and Patch

Hello everyone,

 

i am trying to patch a field that is a people picker with selectMultiple set to true. So for example someone can search for 3 people and have them in the field. Now to patch this i keep getting just 1 name, so i tried the Table:

 

selectMultiple_field:
Table(
{
Claims: "i:0#.f|membership|" & DataCardValue63.Selected.Email,
Department: "",
DisplayName: DataCardValue112.Selected.DisplayName,
Email: DataCardValue112.Selected.Email,
JobTitle: "",
Picture: ""
}
)

 

This worked but still only patched one person, so i then decided to try a Forall(table... i can't get this to work. Can you do a forall inside of a patch ? and how can i patch multiple items chosen in the people picker field ?

 

- I seen a post where the person put multiple "Claims, department..etc", hard coded, but what if i dont know exactly how many the person will choose.

 

Thank you for reading and helping

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: ForAll and Patch

Hi mmattar,

 

Do you want to patch multiple items to one person field?

Please take a try with the following workaround:

 

I use one ComboBox and one button to solve the issue.

I tested  by SP List as next:

1.DataSource: 20190115test1 (My SP List name)

Person_Multiple:Person Type (Allow multiple selections)

Person_Single:Person Type

20190115Test1SP.png

2.App Test:

Add one ComboBox and named it ComboBox_Person_Multiple,and its items:

Choices('20190115test1'.Person_Multiple)         (The available items will be show when you search by your ComboBox, then you can select what items you want to patch)

20190115AppTest1.jpg

Add one button and named it Button_Patch, and its OnSelect:

Patch(

   '20190115test1',

    Defaults('20190115test1'),

  {Title:"1",

    Person_Multiple:ComboBox_Person_Multiple.SelectedItems

   })

 

Then select the items by ComboBox and then Click the Button.

 

20190115test1.gif

Best Regards,

Yumia

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: ForAll and Patch

Hi mmattar,

 

Do you want to patch multiple items to one person field?

Please take a try with the following workaround:

 

I use one ComboBox and one button to solve the issue.

I tested  by SP List as next:

1.DataSource: 20190115test1 (My SP List name)

Person_Multiple:Person Type (Allow multiple selections)

Person_Single:Person Type

20190115Test1SP.png

2.App Test:

Add one ComboBox and named it ComboBox_Person_Multiple,and its items:

Choices('20190115test1'.Person_Multiple)         (The available items will be show when you search by your ComboBox, then you can select what items you want to patch)

20190115AppTest1.jpg

Add one button and named it Button_Patch, and its OnSelect:

Patch(

   '20190115test1',

    Defaults('20190115test1'),

  {Title:"1",

    Person_Multiple:ComboBox_Person_Multiple.SelectedItems

   })

 

Then select the items by ComboBox and then Click the Button.

 

20190115test1.gif

Best Regards,

Yumia

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,142)