I'm building an app with a search field that has both button filter and dropdown option filter capabilities.
My idea is based off of this tutorial: https://www.linkedin.com/pulse/powerapps-tracking-app-tutorial-richard-burdes
Button Filters: "PO Received", "Order Processed", "Over 15 Days", "Order Shipped", "Show All"
Dropdown Filters: "All", "Customer", "PO#", "Sales Rep", "Purchaser"
The following code works for me, but I can't figure out how to combine them.
1. The button filters work with the code below:
If(
con_Status = "Show All",
SortByColumns(
Filter(
POCollection,
'Order Status'.Value <> "CANCELLED"
),
"Date",
Ascending
),
SortByColumns(
Filter(
POCollection,
If(con_Status = "Show All", false,
'Order Status'.Value in Split(
con_Status,
","
).Result, true)
),"Date",Ascending))
2. The Dropdown filters work with the code below:
If(
cbSearchFilter.SelectedText.Value = "All",
Filter(
POCollection,
searchQuery in 'Date Received' || searchQuery in Customer || searchQuery in Title || searchQuery in 'PO Total' || searchQuery in 'Quote #' || searchQuery in 'Sales Rep'.Value || searchQuery in 'Assigned Purchaser'.Value
),
If(
cbSearchFilter.SelectedText.Value = "Customer",
Filter(
POCollection,
searchQuery in Customer
),
If(
cbSearchFilter.SelectedText.Value = "PO#",
Filter(
POCollection,
searchQuery in Title
),
If(
cbSearchFilter.SelectedText.Value = "Sales Rep",
Filter(
POCollection,
searchQuery in 'Sales Rep'.Value
),
If(
cbSearchFilter.SelectedText.Value = "Purchaser",
Filter(
POCollection,
searchQuery in 'Assigned Purchaser'.Value
)
)
)
)
)
)
Please help me to combine and possibly simplify these. Thank you!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
200 | |
47 | |
45 | |
45 | |
39 |
User | Count |
---|---|
279 | |
81 | |
81 | |
80 | |
67 |