cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Bvandyke22 Helper I
Helper I

Filter Function

Hi,

I have been working on an app that is a Electrical work request, Mostly based off the Service Desk Template. I got away from having excessive screens for every function to utilizing drop downs and text bars. This app Accommodates the Production and Midstream Electrical requests. The data for each is stored on a separate tab on the excel sheet, and so far almost all of the required data is working. I just got stuck on this filter....

I need help coming up with a If Statement to filter my data.  I'm basically hoping to be able to type any word in a text bar and search across the "Status, Description, Account,  Subject, Comments, and Assigned to" tabs, or when no data is in the text bar, just display all data.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Filter Function

Hi @Bvandyke22 

Unless I'm missing something, you don't need to filter anything.  Search alone will filter your table on all of the columns. The Items property of your gallery should be: 

 

Search(TableName,SearchBox.Text,"Status","Description","Account","Subject")

 

Make sure that the Text property of your SearchBox is "".  If you want to put something in the SearchBox to help the user, then make the Hint property of the SearchBox something like "Search by Status, Description, Account or Subject".  You may want to set the Delay property of the Searchbox to true and allow the user to add more text before the search is initiated. 

 

View solution in original post

7 REPLIES 7
eka24 Community Champion
Community Champion

Re: Filter Function

Filter(Search(TableName,SearchBox.Text,"Status","Description","Account","Subject"))

 

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Bvandyke22 Helper I
Helper I

Re: Filter Function

Thanks for the quick response, however the function provides an error. It says

Invalid number of arguments: Received 1, Expected 2 or more.

eka24 Community Champion
Community Champion

Re: Filter Function

Did you insert a textbox and name it SearchBox as in the formula. Please give a screenshot

Bvandyke22 Helper I
Helper I

Re: Filter Function

The only changes I made to the formula were where needed for the table name and column names

Super User
Super User

Re: Filter Function

Hi @Bvandyke22 

Unless I'm missing something, you don't need to filter anything.  Search alone will filter your table on all of the columns. The Items property of your gallery should be: 

 

Search(TableName,SearchBox.Text,"Status","Description","Account","Subject")

 

Make sure that the Text property of your SearchBox is "".  If you want to put something in the SearchBox to help the user, then make the Hint property of the SearchBox something like "Search by Status, Description, Account or Subject".  You may want to set the Delay property of the Searchbox to true and allow the user to add more text before the search is initiated. 

 

View solution in original post

Bvandyke22 Helper I
Helper I

Re: Filter Function

Ok I will give that a try and see how that works. Thank you!
eka24 Community Champion
Community Champion

Re: Filter Function

@Drrickrypis right I made a mistake on the formula

Search(TableName,SearchBox.Text,"Status","Description","Account","Subject")

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,858)