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

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

1 ACCEPTED SOLUTION

Accepted Solutions
KevinSquirrels
Level: Powered On

Re: Browse SP Docs based on URL from SP list

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

19 REPLIES 19
Dual Super User
Dual Super User

Re: Browse SP Docs based on URL from SP list

Hi @KevinSquirrels 

 

Can you try to use the expression on the "Items" property of second gallery?
 
Filter(Documents,IsFolder = false && StartsWith('Link to item',Gallery1.Selected.Docs))
 
This will filter out the files in the specific folder.
 
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!
KevinSquirrels
Level: Powered On

Re: Browse SP Docs based on URL from SP list

Hi @yashag2255 ,

 

Thanks for the reply. I couldnt get it to work. This is what I have

 

Filter(Shares,IsFolder = false && StartsWith('Link to item',galContractors.Selected.'Supplier Folder'))

 

"Shares" is my SP doc lib and "galContractors" is my gallery from the first screen

 

Did I do something wrong?

 

Thanks

 

Dual Super User
Dual Super User

Re: Browse SP Docs based on URL from SP list

Hi @KevinSquirrels 

 

Can you please confirm that the value passed to the 'Supplied Folder' is in the format: https://abcd.sharepoint.com/sites/sitename/Shares/FolderName 
 
Also, this should match with the 'link to item' value in the document library. If this differs, please share more details and we can update the formula accordingly.
 
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!
KevinSquirrels
Level: Powered On

Re: Browse SP Docs based on URL from SP list

Hi @yashag2255 ,

 

The URL in the SP list pointing to the doc lib looks like this

 

https://xxxxxx.sharepoint.com/:f:/r/sites/SPD-OAK-Site/Shares/H%26S/Contractors/Contractor%20Informa...

 

Should I change them to a more practical format like you have shown below?

 

I'm not understanding the 'Link to Item' value you have referenced. Sorry I'm fairly new to PowerApps as you can probably tell 🙂

 

Thanks

Dual Super User
Dual Super User

Re: Browse SP Docs based on URL from SP list

Hi @KevinSquirrels 

 

If you can save the folder urls in the format provided by me, this will resolve the issue and get the specific documents.
 
The 'Link to Item' contains the url for the specific item in the document gallery, it could be folder or file.
 
If you continue to use the url used in the list, you can update your expression as(this contains a lot of manipulation over the strings):
Filter(Shares,IsFolder = false && Concatenate(Substitute(First(Split(Last(Split(Gallery3.Selected.Docs,"Shares/")).Result,"?")).Result,"%20"," "),"/") = 'Folder path' )
 
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!
KevinSquirrels
Level: Powered On

Re: Browse SP Docs based on URL from SP list

Hi @yashag2255 

 

I've changed one of the links in the SP list to https://xxxx.sharepoint.com/sites/SPD-OAK-Site/Shares/H%26S/Contractors/Contractor%20Information/316...

 

And my formula is Filter(Shares,IsFolder = false && StartsWith('Link to item',galContractors.Selected.'Supplier Folder'))

 

Sorry still cannot get it to work. Is it because I have spaces in the link?

 

Thanks

Dual Super User
Dual Super User

Re: Browse SP Docs based on URL from SP list

Hi @KevinSquirrels 

 

Can you try to update the expression as:
 
Filter(Shares,IsFolder = false && StartsWith('Link to item',Substitute(galContractors.Selected.'Supplier Folder',"%26","&")))
 
Also, did you try the other expression for the string manipulation?
 
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!
KevinSquirrels
Level: Powered On

Re: Browse SP Docs based on URL from SP list

Hi @yashag2255 

 

I cannot thank you enough for helping but it still doesnt work.

 

Filter(Shares,IsFolder = false && StartsWith('Link to item',Substitute(galContractors.Selected.'Supplier Folder',"%26","&")))

The string manipulation filter didnt work either.

 

I dont get any errors in the formula it just doesnt display any documents.

 

 

Dual Super User
Dual Super User

Re: Browse SP Docs based on URL from SP list

Hi @KevinSquirrels 

 

Here, as part of formula we are trying to find the documents where the link for it starts with the url string extracted from the gallery1 selected item. 
 
So, the plan was to get the records were the child items in a list will start with the url of the list.
 
Can you do a small test on a separate screen? Create a gallery and pass Items as Shares, now in the title label pass ThisItem.'File Name With Extension' and subtitle as ThisItem.'Link to Item'. Now, create a label outside of this gallery and on the "Text" property, use the expression: galContractors.Selected.'Supplier Folder'. Now, please match if the items in the gallery for specific folder that you are trying to get exactly starts with the label outside the gallery. Let me know if there is a mismatch and we can rebuild the formula.
 
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!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,651)