Hello,
I am currently facing an issue with Power Apps where I am unable to filter dropdown values based on multiple associated user records. Here's a brief overview of the problem:
I have an app where users are associated with specific roles and countries, and I am trying to filter dropdown values based on these associations. The issue arises when attempting to display all associated records for a specific user, role, and country in the dropdown. Currently, the filtering logic is only displaying a single record, and I need it to display all the associated records.
Here's an example of the code I'm currently using in the OnVisible property of the screen and for the dropdown:
OnVisible Property:
ClearCollect(
colFilteredClans,
Filter(
ClansAssociations,
Country.Value = varAssociatedCountry &&
ClanID.Value in LookUp(
Users,
EmailAddress.Email = User().Email &&
Roles.Value = varUserRole &&
UserCountryID.Value = varAssociatedCountry
).ClanID.Value
)
);
Dropdown:
Distinct(colFilteredClans, IDClanes.Value)
In the code, the varAssociatedCountry variable should be dynamically determined based on the user's context.
I've attempted various adjustments to the logic, including using ForAll and Filter functions, but I haven't been able to achieve the desired result. I need the dropdown to display all the associated values for the user based on the provided criteria.
How can I adjust the code to ensure that all associated records are correctly displayed in the dropdown?
Thank you for your assistance.

Report
All responses (
Answers (