cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Responsive Resident
Responsive Resident

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (3,398)