cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ithinkican123
Regular Visitor

Text search box

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!

 

 

Screen Shot 12-15-17 at 01.14 PM.PNG

 

 

 

Screen Shot 12-15-17 at 01.14 PM.PNG

25 REPLIES 25
Anonymous
Not applicable

This si the filter i am using and i am want to search by department name, manager name and the title: 

 

If(IsMatch(admins.users,User().Email,Contains)=true, SortByColumns(Filter('Out of office (No approvals)',
StartsWith(Title, TextSearchBox1.Text)
, If(
Submitted=false && Approved=false && Declined=false && Cancelled=false,
true,
If(Submitted, 'Status of Request'.Value = "Submitted", false) || If(Approved, 'Status of Request'.Value = "Approved", false) || If(Declined, 'Status of Request'.Value = "Declined", false) || If(Cancelled, 'Status of Request'.Value = "Cancelled", false )
) ), "Title", If(SortDescending1, Descending, Ascending)), SortByColumns(Filter('Out of office (No approvals)', StartsWith(Title, TextSearchBox1.Text), If(Manager.Email = User().Email, Manager.DisplayName = User().FullName, Requester.DisplayName = User().FullName) , If(
Submitted=false && Approved=false && Declined=false && Cancelled=false,
true,
If(Submitted, 'Status of Request'.Value = "Submitted", false) || If(Approved, 'Status of Request'.Value = "Approved", false) || If(Declined, 'Status of Request'.Value = "Declined", false) || If(Cancelled, 'Status of Request'.Value = "Cancelled", false )
) ), "Title", If(SortDescending1, Descending, Ascending)))

 

 

 

I cannot use your formula because it gives error.

 

Capture.PNG

Just wanted to know that i already have the item filed with this formula filter,

 

If(
StatusResult <> "All",
Filter(
'Petty Cash',
'Status ' = StatusResult
),
'Petty Cash'
)

 

And i want the search text box to search the filed with employee name from my SP List name Petty cash. i tried this as per your above solution but this does not seems to work for me.

 


i don't know why, will you suggest why is this so?

 

If(
StatusResult <> "All",
Filter(
'Petty Cash',
'Status ' = StatusResult
),
'Petty Cash'
) || SortByColumns(
Filter('Petty Cash', 
StartsWith('Employee Name ', TextSearchBox1.Text)), 
"EmployeeName", 
If(SortDescending1, Descending, Ascending))

 

it shows error., do you know why?

I have list name : Petty Cash in SPList,

Column in SpList: Employee name

And a Lable in my Gallery Items, which displays the Employee name.

@eka24 @iAm_ManCat @WarrenBelz 

The error suggests delegation warning. Is your table more than 2000 rows. Otherwise go to settings and increase it to 2000. Is it sharepoint list?

If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution

Hey @Tapesh,

 

I think this is more likely to work, could you give it a try?

 

SortByColumns(
   Filter(
      'Petty Cash',
      StatusResult = "All"
      ||
      'Status ' = StatusResult,
      TextSearchBox1.Text = ""
      ||
      StartsWith('Employee Name', TextSearchBox1.Text)),
   ), 
   "EmployeeName", 
   If(SortDescending1, Descending, Ascending)
)

 

 If it's not working, then please send back a screenshot of the error message you receive,

 

Thanks!

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Hi @iAm_ManCat 

 

Please find the error below as you said i tried the solution but seems like not working again. Display.pngDisplay2.png

Based on the formula by @iAm_ManCat 
Remove the single  quotes on status. Are both StatusResult and Status ColumnNames?

'Status ' = StatusResult,

 

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 .

Please can you respond to my last reply

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 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

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,884)