cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Multiple People Picker value based on Combo box value

Hi All,

i have a simple requirement where in i would like to populate my multiple select people picker based on selection in a combo box

Requirement
I have a combo box that populates Region Value ( NA , Brazil , China .. etc.)
I have a people picker field ( Multiple Selection)

Now, as i select the Region Value, it should automatically populate all the employee name mapped to that region. 
All the mapping of employee and Region is stored in another list called details.
i am using the below formula to populate the data in People Picker  , however it does not populate the data;

Filter('Details',Region = Combobox4.selected.Result).'Employee Name'

When i use lookup instead of filter it brings up the first value but the filter does not populate anything.
Please suggest what am i doing wrong?

Thanks in advance guys!!

Cheers!!

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try to apply the following formula to DefaultSelectedItems property of combobox.

 

DropColumns(
    AddColumns(
        Filter('Details',Region = Combobox4.selected.Result).'Employee Name',
        "Claims",
        'Employee Name'.Claims,
        "Department",
        'Employee Name'.Department,
        "DisplayName",
        'Employee Name'.DisplayName,
        "Email",
        'Employee Name'.Email,
        "JobTitle",
        'Employee Name'.JobTitle,
        "Picture",
        'Employee Name'.Picture
    ),
    "Employee Name"
)

 Hope this helps,.

Sik

View solution in original post

4 REPLIES 4
v-siky-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try to apply the following formula to DefaultSelectedItems property of combobox.

 

DropColumns(
    AddColumns(
        Filter('Details',Region = Combobox4.selected.Result).'Employee Name',
        "Claims",
        'Employee Name'.Claims,
        "Department",
        'Employee Name'.Department,
        "DisplayName",
        'Employee Name'.DisplayName,
        "Email",
        'Employee Name'.Email,
        "JobTitle",
        'Employee Name'.JobTitle,
        "Picture",
        'Employee Name'.Picture
    ),
    "Employee Name"
)

 Hope this helps,.

Sik

Anonymous
Not applicable

@v-siky-msft your solution worked like a charm , however could you explain to me a little as to how did it exactly work so i can understand it and use it in other projects of mine.
Thanks a lot.

Hi @Anonymous ,

 

This is actually a table construction issue.

Let's see the preview of "Filter('Details',Region = Combobox4.selected.Result).'Employee Name'" formula. It is a Table with nested table in Employee Name column. 

Snipaste_2020-06-25_17-40-28.png  Snipaste_2020-06-25_17-37-30.png

However, What the DefaultSelectedItems property of Person column require is like this, so we just need to expand the nested table.

Snipaste_2020-06-25_17-42-10.png

 

Hope this helps.

Sik

Anonymous
Not applicable

@v-siky-msft thanks that helped alot.

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (3,978)