I have a PowerApp in which I have a form the form contains 3 dropdowns 1. Site 2. Team and 3. Assigned Person. Now based on the selected dropdown 1 and 2 (Site and Team) I have to filter assigned Person dropdown and if any one or both are missing then the default values i.e a collection( ColAllValues) should be displayed in the Assigned Person dropdown. How can I achieve this?
I added in the items property of Assigned Person Dropdown this code but it is not working:
If(
IsBlank(First(drpSite.SelectedItems)) && IsBlank(First(drpTeam.SelectedItems)),
SortByColumns(
Filter(
ColAllValues,
Urgent= If(
drpTrigger.Selected.Value = "Urgent",
true,
false
)
),
"Title",
SortOrder.Ascending
),
IsBlank(First(drpSite.SelectedItems)),
SortByColumns(
Filter(
ColAllValues,
Team in drpTeam.SelectedItems.Value,
Urgent= If(
drpTrigger.Selected.Value = "Urgent",
true,
false
)
),
"Title",
SortOrder.Ascending
),
IsBlank(First(drpTeam.SelectedItems)),
SortByColumns(
Filter(
ColAllValues,
Site in drpSite.SelectedItems.Value,
Urgent= If(
drpTrigger.Selected.Value = "Urgent",
true,
false
)
),
"Title",
SortOrder.Ascending
)
);
I also added this code on the Onchange of the dropdown 1 and 2 i.e. site and team and added it to a collection and on the items property of Assigned Person I added but this is also not working
If(Isblank(colFilteredAssignedPerson),colAllValues,colFilteredAssignedPerson)
Please help me how can I achieve it.