cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Browse SP Docs based on URL from SP list

Hi, I have an app which requires the user to view the contents of a Sharepoint Doc Lib. Here is my situation.

 

Screen one is a browse gallery of a SP list with the following columns.

Contractor (Text Field)

Email (Text Field)

Docs (URL to a specific SP Doc lib folder)

 

I'll like to add a button on screen1 that takes them to screen 2. Screen 2 should be a browse gallery of the URL column from the selected item from screen 1

 

Can anyone point me in the right direction.

 

Thanks

19 REPLIES 19
Highlighted

Hi @yashag2255 ,

 

This is the output from the test.

2019-09-08 07_54_35-PAT-OAK-Approved Contractors - Saved (Unpublished) - PowerApps.png

 

 

Thanks

Highlighted

Hi @KevinSquirrels 

 

In that case, can you try to update the expression as:
 
Filter(Shares,IsFolder = false && StartsWith('Link to item',Substitute(Substitute(First(Split(galContractors.Selected.'Supplier Folder',"?")).Result,"%26","&"),":f:/r/","")))
 
In the test that you carried out, please check that the Substitute(Substitute(First(Split(galContractors.Selected.'Supplier Folder',"?")).Result,"%26","&"),":f:/r/","") returns the string that we are looking for. If it is, then it should return the records.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted

Hi @yashag2255 

 

The Substitute(Substitute(First(Split(galContractors.Selected.'Supplier Folder',"?")).Result,"%26","&"),":f:/r/","") returns the following value 

 

https://abc.sharepoint.com/sites/SPD-OAK-Site/Shares/H&S/Contractors/Contractor%20Information/Antali...

 

The "link to Item" value is

 

https://abc.sharepoint.com/sites/SPD-OAK-Site/Shares/H&S/Contractors/Contractor%20Information/Antali...

 

They look identical so I'm not sure why its not showing anything

 

Thanks

 

Highlighted

Hi @KevinSquirrels 

 

This is strange! Can you try to refresh the data sources and update the expression as:
 
Filter(Shares,StartsWith('Link to item',Substitute(Substitute(First(Split(galContractors.Selected.'Supplier Folder',"?")).Result,"%26","&"),":f:/r/","")))

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted

Hi @yashag2255 

 

I think we might be getting somewhere. The gallery now shows me the folder of the selected item. However it only shows the folder name and not the contents.

 

2019-09-08 13_46_34-PAT-OAK-Approved Contractors - Saved (Unpublished) - PowerApps.png

I cannot thank you enough for the advice and help you have given me so far. I really appriciate your time and advice.

Highlighted

Hi @KevinSquirrels 

 

Can you please check if the specified folder contains item? Based on the expression results, I think either there are no files in this folder or the file link differs for the items inside this document library.
 
Can you check the "Link to Item" value for any of the file inside the document library by using the below expression on a temporary label as:
 
LookUp(Shares, 'File Name With Extension' = "FileName.Extension").'Link To Item'
 
Hope this helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted

Hi @yashag2255 

 

Each of the folders contains files so thats all good. When I add a temp label with the following property 

 

LookUp(Shares,'File name with extension' = "HSPolicy2016.pdf").'Link to item'

 

It doesnt find it. I know its there as per screen shot below

 

2019-09-08 13_46_34-PAT-OAK-Approved Contractors - Saved (Unpublished) - PowerApps.png

Highlighted

Hey @KevinSquirrels 

 

I carried out few tests on my side and I am not able to replicate this. I even tried to create same hierarchy as you but still I am able to see the results.
Can you try to create a new test app? Create the connection to this document library and try to fetch the results.
 
The strangest part is the Shares document library is not returning the file when searched by its name.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted

Hi @yashag2255 

 

I've now created a new test and pointed it to a different doc lib. It worked!!! I created a dummy URL in my SP list pointing to the other doc lib. I can see the contents of the folder now.

 

It must be something to do with this doc lib. 

 

Thank you for your help.

 

View solution in original post

Highlighted

Hi @KevinSquirrels 

 

Glad that it worked. I hope your query is resolved. Please mark this as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,646)