Im tryng to filter a gallery list i can filter in the seach box its is working good, but also would like to filter by a status in a dropdown??
the code im using at the moment is,
SortByColumns(Search('Concierge Tracker', TextSearchBox1.Text, "Account", "Concierge_Specialist", "Vehicle_Reg"), "Date", If(SortDescending1, Descending, Ascending))
I would also like to search via a job number? does anyone know how to add this on??
You can combine multiple Search (and Filter) usages in the same expression to search/filter by multiple conditions. For example, to filter by the value of the status shown in the dropbox, in addition to the current search, you could do
SortByColumns( Search( Filter( 'Concierge Tracker', Status = DropdownStatus1.Selected.Value), TextSearchBox1.Text, "Account", "Concierge_Specialist", "Vehicle_Reg"), "Date", If(SortDescending1, Descending, Ascending))
To search for a job number, in addition to the fields you are already searching on (Account, Concierge_Specialist, Vehicle_Reg), you can pass that additional field to the Search function. That function will search the given text in all of the columns that you passed to it.
That's great Thank you,
the job numbers are in a number format though? you helped me before on this formula before but im unable to get work with both, drop down and search?
Are you looking for MULTIPLE search functions?
1. Search by default from PowerApps
2. Search using Dropdown
3. Search using Gallery,...
Be default, PowerApps provides:
- SortByColumns(Search(CustomGallerySample, TextSearchBox2.Text, "SampleText"), "SampleText", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))
1. ClearCollect all your "Sort & Search results into a Temporay Table, TableX" and list out in Gallery.Items"
2. The way to trigger ClearCollect can be
This is very useful for many scenario. "For me only", this is Simple, Easy to Understand.
You can add more behavior formula such as:
- UpdateContext to clear the TextInput when filter with Dropdown, etc.
You can modify this by:
- Screen.OnVisible and a Button, with
Screen,OnVisible = ClearCollect(TableX, TableBrand) &
Button.OnSelect = ClearCollect(TableX, TableBrand)
Then, set the
- Gallery.Items = TableX
Then, you can have mulltiple search as you wish.
1. Typical TextInput is modified as:
TextInput.OnChange & TextInput.OnSelect =
ClearCollect(TableX, SortByColumns(Search(TableBrand, TextSearchBox1.Text, 'Maker', 'Origin'), 'Maker', If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)))
ClearCollect(TableX, SortByColumns(Search(TableBrand, Dropdown1.Selected.Result, 'Brand'), 'Maker', If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)))
or using FILTER, etc. to replace Search or even others.
Hope this helps.
Have a nice day.
Seem like i have the same problem with the Dropdown filter, I have Search which is defined from powerapp that works fine.But i have added the new dropdown control from controls to filter the gallery column status. I needed to define two different approches which should not be interlinked to each other, means search should get the values from gallery as one search criteria and where dropdown should work in both ways to gallery like when User any of the one condition below for ex: "All" gallery should show all results and " Approved" only approved status.
1. Gallery is called default browsegallery1 ()
2. Status column is fetching the data from sharepoint list as "All","Open", "Pending", "Approved"(This will work when user inputs the data from the normal dropdown list from sharepoint to Powerapps) in powerapps i have defined the for subtitle3 text to "status.value".
3. Now i need to filter the gallery using dropdown when user selects the status accordingly with all other details in the gallery columns.
1. Same goes with the datefilter when user selects startdate and enddate later when user clicks on apply button the gallery suppose to filter the date submitted column.
2. Date column uses the formula as Thisitem.created
Thanks in advance!
Check it out!
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand