Populate Trainer’s Group Depending Upon Dropdown Value

Introduction

This is a complicated scenario where a group of individuals is listed in a drop-down menu, and every person in the list is selected based on the value specified in the drop-down menu.

Scenario

We'll build a PowerApp where the subject name will appear in a drop-down menu. Every trainer will be filled in after the subject has been chosen. After that, we will have the choice of trainers for that instruction.

Objective

Our goal is to have values from list rows appear when a drop-down menu is selected.

Step 1. Create two lists for the purpose of the database.

Two lists will be made by us. Details about the training will be kept in one list, and information on the trainers in another.

Database

Trainers' details will follow the below list architecture. This will be the second list.

Trainers' details

Step 2. Create a PowerApps.

These are the fundamental stages for designing screens with forms and creating PowerApps.I changed the form mode from Edit to New because it's merely for demonstration purposes. In this manner, the form loads correctly, and the output is shown accurately.

 Create a PowerApps

Screen

Step 3. Connect with both data sources.

We are all aware that in order to develop a form, we must connect to a data source. Additionally, connecting all data sources that the program will use is required. To avoid seeing an access forbidden error, every user ought to have authorization to view the lists.

Data sources

Step 4. Populate the Trainer group.

This value is obtained using a drop-down control. Our goal is to display every trainer, and then select one to be the designated trainer by selecting it from the populated value. The screen below shows the trainers populated in a drop-down menu.

Trainer group

Below is the formula to populate all the trainers in the dropdown.

Item

Step 5. Concatenate people so that it appears as a Trainer group.

As the title implies, all of the trainers will be concatenated and shown as a string in a single text field, separated by commas, solely for readability purposes.

Title implies

Step 6. Show people in the dropdown for assignment of training purposes.

As stated in the heading from the individuals that the trainer has visualized as a drop-down menu.

in order for them to be allocated to and kept in the SharePoint list.

SharePoint list

Step 7. Update property - Subject.

The subject is internally a title column. To avoid confusion I have shown the updated property of the subject too.

Update property

Step 8. Update property - TrainerAssigned.

The update property of Trainer Assigned is simple which is just the selection of drop-down value gets saved.

TrainerAssigned

Step 9. DisplayFields property – People dropdown control TrainersAssigned.

We can display all three details along with a picture that looks good too. Otherwise, only Display Name also works well.

DisplayFields property

The output of changing the DisplayFields property would look like this

Output

Step 10. Update property – People Group or TrainersGroup.

It's interesting to update, and everyone in the group should be updated. In the event that the drop-down menu is updated, we will need to manually choose every value or only one. Therefore, using this strategy, saving the Trainers Group is the simplest option.

Update

Conclusion

This article demonstrated how to utilize a drop-down value to determine the group's membership, store the results, and then use that value to save the results in the list once more. People picker is a complicated column, and occasionally we are unable to store it straight when it is needed.


Similar Articles