Reputation: 1
I am building a Power Apps screen with the following setup:
Objective: I want to filter the ComboBox (cmb) to display only the people currently shown in the Final gallery, rather than all the people associated with my account.
Implementation Details:
OnVisible of the Screen:
ClearCollect(
UserCollection,
ForAll(
Tasks,
If(
!IsBlank(User),
User
)
)
)
Items of the ComboBox:
Filter(
Choices([@Tasks].'User'),
DisplayName in ForAll(
UserCollection,
ThisRecord.DisplayName
)
)
Issues Encountered:
Expected Behavior: The ComboBox should show only the people currently appearing in the Gallery (Final).
Actual Behavior: The ComboBox filters all people connected with my account, not just the ones visible in the Gallery.
Question: How can I correctly filter the ComboBox (cmb) to show only the User values currently displayed in the Gallery?
Upvotes: 0
Views: 54
Reputation: 196
The items parameter of your Gallery should the original datasource, not a Choice() function, and you should filter it. Like:
Filter(
Tasks,
User.Email = ComboBox1.Selected.User.Email)
Upvotes: 0