cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MiniMe83
Helper III
Helper III

Document Library

Hi,


Is it possible to create a search function which goes off and searches a document library for certain file extensions and names and display those files in a table of some sort? What I’m also looking to do is present certain cells from each file in the table with a link to the file.

 

Is this possible? I have it as an excel workbook using VBA code but was wondering if I could duplicate and future proof this method.

 

Thanks for any help 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @MiniMe83 ,

Firstly, you need to connect your app with the sharepoint library.

Then use a gallery to display the filtered items.

1)filter files based on search text

set the gallery's Items:

If(IsBlank(TextInput1.Text),Documents,Search(Documents,TextInput1.Text,"{Name}"))
//please replace with your library name

2)only display the excel file

set the gallery's Items:

Filter(Documents,!IsFolder,"csv" in 'Full Path')

3)display the file's link in the gallery

set one label's Text inside the gallery:

ThisItem.'Link to item'

If you want to open that file by clicking the label, you could also set the label's OnSelect:

Launch(ThisItem.'Link to item')

713.PNG

 

 

What's more, I'm afraid it's not supported to get the data in the file by using the connector of sharepoint.

You could only the file's name, path, link, ect.

 

 

Best regards,

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

View solution in original post

4 REPLIES 4
KrishnaV
Super User
Super User

Hi @MiniMe83 ,

 

You can do it by adding a gallery and a text box with the below formula.

Set this to items property of the gallery:

Filter(documentlibname,Search(textbox.Text,Name))

The above search will check as part of the file and will show the gallery items accordingly. 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Hi @KrishnaV 

 

So I’m using the document library as the data source for the gallery, is that correct?

 

Also, how do I display only certain files within the document library? For example, only excel file extensions........ and certain cell values from within found files? I am a novice but always learning.

 

Thanks for your help

v-yutliu-msft
Community Support
Community Support

Hi @MiniMe83 ,

Firstly, you need to connect your app with the sharepoint library.

Then use a gallery to display the filtered items.

1)filter files based on search text

set the gallery's Items:

If(IsBlank(TextInput1.Text),Documents,Search(Documents,TextInput1.Text,"{Name}"))
//please replace with your library name

2)only display the excel file

set the gallery's Items:

Filter(Documents,!IsFolder,"csv" in 'Full Path')

3)display the file's link in the gallery

set one label's Text inside the gallery:

ThisItem.'Link to item'

If you want to open that file by clicking the label, you could also set the label's OnSelect:

Launch(ThisItem.'Link to item')

713.PNG

 

 

What's more, I'm afraid it's not supported to get the data in the file by using the connector of sharepoint.

You could only the file's name, path, link, ect.

 

 

Best regards,

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

View solution in original post

Hi @MiniMe83 ,

 

Accept my sincere apologies for late reply.

 

Yes I totally with the approach advised by @v-yutliu-msft and coming to showing some  "and certain cell values from within found files", PowerApps doesn't search the content inside the file.

 


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (964)