cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kpavlidis
Level: Powered On

Fillter All Gallery Fields with one text

How can i filter all the fields of a gallery without using || and adding all possible fields that a specific gallery has.

 

So i do not do something like


Filter([GalleryName],Input.Text in GalleryName.Field1 || Input.Text in GalleryName.Field2 etc....)

 

I would like to have a filter that search all fields added in a gallery for specific text.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Fillter All Gallery Fields with one text

Hi @kpavlidis,

Could you please share a bit more about your scenario?

Do you want to filter your Gallery items based on all fields within it without using || (Or) operator?

Further, could you please share a bit more about your data source within your app?

I agree with @Drrickryp's thought almost. I think the Search function could achieve your needs. You could consider take a try with the following workaround:

Search('YourDataSource', TextInput1.Text, Field1, Field2, Field3, ...)

More details about the Search function, please check the following article:

Search function

The above formula may cause a Delegation issue when the Search function could not be delegated within your data source (e.g. SharePoint list). If your data source is a SP list, the Search function could not be delegated within it.

More details about the Delegable data source, please check the following artilce:

As an alternative solution, please take a try with the following workaround:

Set the OnVisible or OnStart property of the first screen of your app to following (when the number of your data records is not more than 2000):

ClearCollect(RecordsCollection, 'YourDataSource')

Set the Items property of your Gallery control to following:

Search(RecordsCollection, TextInput1.Text, Field1, Field2, Field3, ...)

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Super User
Super User

Re: Fillter All Gallery Fields with one text

Hi @kpavlidis,

The best way to do what you want is with the Search() function as you can search multiple fields with the same text.  However, Search() is not delegatable in SharePoint but it can be used in a collection of the items from a SharePoint list.  The work around is to collect the list using the ClearCollect() or Collect() functions and then to use the collection in the items property of the gallery.  To do this you would put 

Collect(colList,yourlistname)

in the OnVisible property of the Screen containing the gallery.  If there was a TextInput control called TextInput1 on the screen, you would make Items property of the Gallery

Search(colList, TextInput1.Text,"Column1","Column2",...) 

 where "Column" is the column name for the columns in the list that you wanted to search for the string in the TextInput control.  Search would match all instances of a text found in any of the columns and display these rows in the gallery. 

Community Support Team
Community Support Team

Re: Fillter All Gallery Fields with one text

Hi @kpavlidis,

Could you please share a bit more about your scenario?

Do you want to filter your Gallery items based on all fields within it without using || (Or) operator?

Further, could you please share a bit more about your data source within your app?

I agree with @Drrickryp's thought almost. I think the Search function could achieve your needs. You could consider take a try with the following workaround:

Search('YourDataSource', TextInput1.Text, Field1, Field2, Field3, ...)

More details about the Search function, please check the following article:

Search function

The above formula may cause a Delegation issue when the Search function could not be delegated within your data source (e.g. SharePoint list). If your data source is a SP list, the Search function could not be delegated within it.

More details about the Delegable data source, please check the following artilce:

As an alternative solution, please take a try with the following workaround:

Set the OnVisible or OnStart property of the first screen of your app to following (when the number of your data records is not more than 2000):

ClearCollect(RecordsCollection, 'YourDataSource')

Set the Items property of your Gallery control to following:

Search(RecordsCollection, TextInput1.Text, Field1, Field2, Field3, ...)

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 55 members 4,314 guests
Please welcome our newest community members: