cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ScottReichard
Level: Powered On

Need help setting multi select person field in PowerApp form based on a lookup

Need help figuring out how to set the value of a multi select Person/Group field (Trainees) of a SharePoint list (Training Forms) within a PowerApp form, based on doing a lookup of people from a different SharePoint list (Training Groups).

 

Want the the user to be able to access the Training Form, use some field / control to select one or more Training Groups that map to the Training Groups list, which in turn fills in the Trainees field of the Training Form with all the people who are in each selected Training Group.

 

I don't want the Trainees field to be updated on the actual SharePoint list until the user has saved the Training Form. I need the user to be able to add one or more Training Groups, but then be able to edit what all people are put into the Trainees field before saving the form.  Additionally, the user should be able to add a group, save and close the form, then access again and add one or more other groups, which should ADD the extra people from those groups, NOT replace the people already in the Trainees field.

 

Ideally it would work like this:

  1. The user selects Training Group A, and the following people are added to the Trainees field (only on the form, not saved to the actual sharepoint list yet):  John, Tom, Laura, Jerry.
  2. The user then removes Jerry from the people shown in the Trainees field on the form.
  3. The user saves the form, and John, Tom, and Laura are saved as the Trainees for the Training Form.
  4. The user reopens the form and selects Training Group B, and now Scott, Anthony, and Katherine are added to the Trainees field along with the existing people (John, Tom, and Laura).  The user saves the form, locking in all those people.

 

Any help would be greatly appreciated.  Fairly new to PowerApps, so not sure how best to do this, or if this is even possible.

3 REPLIES 3
Community Support Team
Community Support Team

Re: Need help setting multi select person field in PowerApp form based on a lookup

Hi @ScottReichard ,

Could you please share a bit more about the data structure of your Training Groups SP list?

Do you add a LookUp column (which allows "Allow Multiple Selections" option) in your Training Forms SP list to reference group values from the Training Groups SP list?

If you could provide more details about your SP lists, we could provide a proper workaround for you.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ScottReichard
Level: Powered On

Re: Need help setting multi select person field in PowerApp form based on a lookup

Hi @v-xida-msft thank you for the quick response!  Here is some more details:

 

We have the Training Groups SP list that has 3 fields:

  1. Title - this is the default Title field
  2. Employee - Person/Group field that only allows one person to be selected
  3. Process Area - Choice field that only allows one selection from the list of choices

 

On the Training Form SP list there are many fields, but the fields related to the problem at hand include:

  1. Process Area - Choice field that only allows one selection from list of choices
    1. The choices for this field are the same choices in the Process Area field of Training Groups SP list
  2. Trainees - Person/Group field that allows multiple selections

 

Today, when a Training Form is first created, a Microsoft Flow runs and actually pulls all the Employees from Training Groups SP list that have a Process Area that matches the Process Area of the Training Form itself and adds them to the Trainees field of that Training Form.

After that, the 'trainer' is able to go and make adjustments on the Training Form before completing the form with a Training Date and Location.  This is the point where we would like to also give the 'trainer' the capability to add more groups of employees from Training Groups.  We're just not sure how best to go about this.

ScottReichard
Level: Powered On

Re: Need help setting multi select person field in PowerApp form based on a lookup

Hi, my reply was removed as spam for some reason so reposting.

 

The Training Groups SP list is made up of 3 fields:

  1. Title - default title field
  2. Employee - single selection Person/Group field
  3. Process Area - single selection Choice field

 

The Training Form SP list is made up of a bunch of fields, with the notable fields pertaining to the problem at hand including:

  1. Process Area - single selection Choice field containing the same choice options as the Process Area field in Training Groups SP list
  2. Trainees - multiple selection Person/Group field

 

Today, when a new Training Form is first created, a Microsoft Flow is kicked off in the background that does several tasks, including doing a lookup where it pulls all Employees from the Training Groups SP list that have a Process Area that matches the Process Area of the Training Form, and adds those people to the Trainees field.  Then, the user (trainer) is able to access the Training Form and set a Training Date, Training Location, and modify the Trainees field.  However, today the trainer has to individually add extra people to the Trainees field.   Ideally, we would like the trainer to have the option to select a different Process Area and have all the Employees in Training Groups SP list that match that Process Area get looked up and added to the Trainees field within the open Training Form and have the chance to review those newly added people, removing some if necessary, before saving the form and actually saving them to the list item.

 

We're really just not sure how to go about this, as we do not have a ton of PowerApps experience.

 

I hope that makes sense.  If more info is needed please let me know.

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
Users Online
Currently online: 346 members 5,922 guests
Please welcome our newest community members: