cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Super User
Super User

Select an entire "jobtitle" in the combobox via person

I would like, to pull the people in a combobox filter, but when selecting a team in the combobox and automatically select all of the team that was chosen

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

clicking on that user in the combobox? Try an on change code that stores the selected user as a local variable, then reloads the combo box, have the default selected items filtered as suggested above. outside of that im not sure how you would do that. for example, your onchange code would be

 

UpdateContext({ComboSelection: ComboBox.Selected.JobTitle});
Reset(ComboBox)

 

 

and your combobox DefaultSelectedItems code would be 

 

If(!IsBlank(ComboSelection),Filter(Employees,JobTitle = ComboSelection))

 

Edit: Just tested, it works, dont know if it will help though as the final output becomes a table and you will need to use concat to break it out into a text string or whatever your using it for.

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Just to clarify, you have a combo box showing all employees, you have another combo box where you select a job title and it selects all people with that job title in the other combo box or just limit the list to those people? If its just limiting then lookup cascading combo boxes, this video covers it pretty thoroughly (https://www.youtube.com/watch?v=Qzpjq008cBY). If its to default select all people with the job title, then set the DefaultSelectedItems setting to a filtered collection using the same data source as the combo boxes item source.

Gorilla_8
Super User
Super User

@Anonymous 

 

I see, no I have a combobox with a filter inside, and I would like to search for a user, by clicking on that user, I would select all the users that are in the same team as him, in the same combobox, it would not be a filter in case

Anonymous
Not applicable

clicking on that user in the combobox? Try an on change code that stores the selected user as a local variable, then reloads the combo box, have the default selected items filtered as suggested above. outside of that im not sure how you would do that. for example, your onchange code would be

 

UpdateContext({ComboSelection: ComboBox.Selected.JobTitle});
Reset(ComboBox)

 

 

and your combobox DefaultSelectedItems code would be 

 

If(!IsBlank(ComboSelection),Filter(Employees,JobTitle = ComboSelection))

 

Edit: Just tested, it works, dont know if it will help though as the final output becomes a table and you will need to use concat to break it out into a text string or whatever your using it for.

 

Gorilla_8
Super User
Super User

@Anonymous 


Thank you so much! Worked!

 

And to concatenate the values I used this code:

Concat(DataCardValue8.SelectedItems;JobTitle &",")

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,963)