Hello I am new to PowerApps and I am having issues with the search Items box. I created a simple test list in sharpoint. I want to be able to search the name and have it display from the list below it. I am not sure if I need to make changes in the BrowseGallery1-items area or the TextSearchBox1 area. Thanks for any help!
Could you elaborate on this part of the function please?
||
NumberColumn = TextSearchBox1.Text
Hi @Yousra
I think you could do something like this:
SortByColumns(
Filter(
ListName,
StartsWith(
Name,
TextSearchBox1.Text
)
||
NumberColumn = TextSearchBox1.Text
),
"Title",
If(
SortDescending1,
Descending,
Ascending
)
)
Cheers,
Sancho
Is it possible for the search bar to search the list by two different criteria:
1. Name (or title)
2. reference number
What would the formula look like in this case?
I'm happy to help @Tapesh - these kinds of filters can be tricky, and they will come up very often 😺
This solution is perfectly working "Sir Sancho"
Thank you so much for correcting me on my issue and clearing me what was wrong and what is the code or formula is doing. Thanks @iAm_ManCat
Hi,
I can see from your screenshot that you got rid of the Sort Ascending/Descending button on that screen, so that part of the formula will no longer work correctly. Also you have modified the code I gave to an incorrect form, your code now only checks if the StatusResult is not equal to "All". and then displays all items
SortByColumns(
Filter(
'Petty Cash',
StatusResult <> "All",
'Status' = StatusResult ||
TextSearchBox1.Text = ""
||
StartsWith('EmployeeName', TextSearchBox1.Text)), "EmployeeName",
If(SortDescending1, Descending, Ascending))
It needs to be something like this:
SortByColumns(
Filter(
'Petty Cash',
// here we are saying that the status variable must be "All",
// which will then not filter any items, or else the status must match the variable
StatusResult="All" || 'Status ' = StatusResult,
// here we are saying, the textbox text is a blank or else it must
// additionally filter the above by EmployeeName based on the Textbox Text
TextSearchBox1.Text = "" || StartsWith('EmployeeName', TextSearchBox1.Text)
),
"EmployeeName",
If(SortDescending1, Descending, Ascending)
)
Can you try something like this and then if it does error, hover your mouse over the error so that we can see the error message details, thanks.
Can you also please paste here the code you are using on each of your status buttons,
Thanks,
Sancho
Hi @eka24
No just the status is the column name and other one StatusResult is variable, and i tried as you said but does not seems to be working
Hi I tried this one it is some what working but the issue here now is, when i click on the different buttons, like All i do not see any data, when i click on pending i see all data, then on approve button as well it shows all data, and same on reject button shows all the data.
SortByColumns(
Filter(
'Petty Cash',
StatusResult <> "All",
'Status' = StatusResult ||
TextSearchBox1.Text = ""
||
StartsWith('EmployeeName', TextSearchBox1.Text)), "EmployeeName",
If(SortDescending1, Descending, Ascending))
could you please let me know what part im doing wrong, i guess something which is related to filter .
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399