cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SylvieLet17
Level 8

Filter Document Library with Wildcard

Hi all, 

 

I have an app with a gallery connected to a SharePoint Document Library. 

I have two TextInput fields: 
Document_Code and Document_Type

I filter the gallery as such: 

Filter(Collection1, Document_Code=TextInput1.Text && 'Type of Document'.Value=TextInput2.Text)

 

But I'd like to be able to do a wildcard filter, so that if any part of TextInput1.Text exists in the Document_Code column, then those results will display as well. 

Anyone know if this is possible?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Filter Document Library with Wildcard

Depends on the how wild you want the wild cards.

If you are referring to "starting with" then use StartsWith.  Otherwise use search.

 

Filter(Collection1, StartsWith(Document_Code, TextInput1.Text) && 'Type of Document'.Value=TextInput2.Text)

 

 

For searching, use:

 Search(Filter(Collection1, 'Type of Document'.Value=TextInput2.Text), TextInput1.Text, Document_Code)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
1 REPLY 1
Super User
Super User

Re: Filter Document Library with Wildcard

Depends on the how wild you want the wild cards.

If you are referring to "starting with" then use StartsWith.  Otherwise use search.

 

Filter(Collection1, StartsWith(Document_Code, TextInput1.Text) && 'Type of Document'.Value=TextInput2.Text)

 

 

For searching, use:

 Search(Filter(Collection1, 'Type of Document'.Value=TextInput2.Text), TextInput1.Text, Document_Code)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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: 168 members 5,398 guests
Please welcome our newest community members: