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
Solved! Go to Solution.
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.
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.
@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
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.
@Anonymous
Thank you so much! Worked!
And to concatenate the values I used this code:
Concat(DataCardValue8.SelectedItems;JobTitle &",")
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |