Hi,
I have a gallery with multiple filters on it and contains the following code for items property:
SortByColumns(Search(Filter('SEA MarketPlace New Item','Created By'.Email =varUser.mail),
TextSearchBox1_3.Text,"Title","Description"),"Created",Descending)
This allows me to see all records created by the current user sorted by most recent.
I have three other combo fields that I would like to create filters for on this same gallery but not sure how to add them to this formula:
1. AvailabilityCombo
2. CategoryCombo
3. ConditionCombo
Would appreciate some help with this. Thanks.
Solved! Go to Solution.
They are all fields in the SEA Marketplace New Item list. So Availability is a dropdown in the list, so too are Category and Condition.
In a previous screen, I have this code which filters where availability = available and only shows items with that status but also has filters on the gallery in case users want to filter by Condition or Category. See below.
With(
{
AvailableItems: Filter(
'SEA MarketPlace New Item',
Availability.Value = "Available"
)
},
SortByColumns(Search(Filter(AvailableItems,IsBlank(CategoryCombo_3.Selected) ||
CategoryCombo_3.Selected.Value ="All" || Category.Value=CategoryCombo_3.Selected.Value, IsBlank(ConditionCombo_3.Selected)
|| Condition.Value = ConditionCombo_3.Selected.Value),TextSearchBox1.Text,"Title","Description"),"Created",Descending)
)
Im trying to use the same SortByColumns piece in the other gallery which is filtered by the current user to only show "your submissions" but I also want the same filters for those users so from their submissions they can also filter by Availability, Category or Condition. Hope this helps.
SortByColumns(Search(Filter('SEA MarketPlace New Item','Created By'.Email =varUser.mail),
TextSearchBox1_3.Text,"Title","Description"),"Created",Descending)
HI @joshieboy ,
Try this way - all the top filter is Delegable, so you only need Search at the bottom
With(
{
AvailableItems:
Filter(
'SEA MarketPlace New Item',
Availability.Value = "Available" &&
'Created By'.Email = varUser.mail &&
(
IsBlank(CategoryCombo_3.Selected) ||
CategoryCombo_3.Selected.Value ="All" ||
Category.Value=CategoryCombo_3.Selected.Value
) &&
(
IsBlank(ConditionCombo_3.Selected) ||
Condition.Value = ConditionCombo_3.Selected.Value
)
)
},
SortByColumns(
Search(
AvailableItems,
TextSearchBox1.Text,
"Title",
"Description"
),
"Created",
Descending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
They are all fields in the SEA Marketplace New Item list. So Availability is a dropdown in the list, so too are Category and Condition.
In a previous screen, I have this code which filters where availability = available and only shows items with that status but also has filters on the gallery in case users want to filter by Condition or Category. See below.
With(
{
AvailableItems: Filter(
'SEA MarketPlace New Item',
Availability.Value = "Available"
)
},
SortByColumns(Search(Filter(AvailableItems,IsBlank(CategoryCombo_3.Selected) ||
CategoryCombo_3.Selected.Value ="All" || Category.Value=CategoryCombo_3.Selected.Value, IsBlank(ConditionCombo_3.Selected)
|| Condition.Value = ConditionCombo_3.Selected.Value),TextSearchBox1.Text,"Title","Description"),"Created",Descending)
)
Im trying to use the same SortByColumns piece in the other gallery which is filtered by the current user to only show "your submissions" but I also want the same filters for those users so from their submissions they can also filter by Availability, Category or Condition. Hope this helps.
SortByColumns(Search(Filter('SEA MarketPlace New Item','Created By'.Email =varUser.mail),
TextSearchBox1_3.Text,"Title","Description"),"Created",Descending)
HI @joshieboy ,
Try this way - all the top filter is Delegable, so you only need Search at the bottom
With(
{
AvailableItems:
Filter(
'SEA MarketPlace New Item',
Availability.Value = "Available" &&
'Created By'.Email = varUser.mail &&
(
IsBlank(CategoryCombo_3.Selected) ||
CategoryCombo_3.Selected.Value ="All" ||
Category.Value=CategoryCombo_3.Selected.Value
) &&
(
IsBlank(ConditionCombo_3.Selected) ||
Condition.Value = ConditionCombo_3.Selected.Value
)
)
},
SortByColumns(
Search(
AvailableItems,
TextSearchBox1.Text,
"Title",
"Description"
),
"Created",
Descending
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps