i have a powerapp form connected to a sharepoint site.
A button rums the below code and creates a collection of document names from a sharepoint site.
ClearCollect(colDocuments, Filter(Documents,'{Path}'="Shared Documents/SMR Documents/" & DataCardValue13.Text & "/",'{IsFolder}'=false));
DataCardValue13.Text changes from folder 01, folder 02 etc dependent on selected sharepoint record.
most times the expressions works and returns correctly, but sometimes it returns nothing for a specific folder, even though there are files in the folder.
Can anyone offer any advice or fault finding tips?
1) Try going here and refreshing the data source in the Power Apps Editor:
2) Even if #1 works - to try to do this in the App runtime instead of outside the App:
Try using Refresh() Function
from somewhere in the App. Such as OnVisible of the screen. See if this works.
If this really works, put a button or icon in there that people using the App and press, and use the OnChange property of that Control, put this Refresh in there, so that it might work to solve this problem.
Check if any of the above help @stujol80
@poweractivate thanks for the quick response.
refreshing has no effect
if i run the expression for 'folder 1' = works correctly.
if i run the expression for 'folder 2' = works correctly.
if i run the expression for 'folder 3' = returns 0 files even though files are in the folder.
if i run the expression for 'folder 4' = works correctly.
if i run the expression for 'folder 5' = returns 0 files even though files are in the folder.
This seems strange to us, we are curious to see if maybe someone else have some insight about it such as @v-xiaochen-msft @v-bofeng-msft @v-siky-msft or otherwise.
Any further thoughts on this issue? @v-xiaochen-msft @v-bofeng-msft @v-siky-msft @poweractivate
HI @stujol80 ,
I suspect your problem is that '{Path}' is not Delegable, therefore you are only getting searching in the first 500-2000 (depending on your settings) files.
I have the same issue with large document libraries, but store the folder structure (one field for each level) in the Library item Metadata when the document is filed. So the Text fields can then be Filtered on any number of records.
If you have ever done SharePoint Workflows, this one is below, but I will be replacing it with Power Automate at some stage. If you have not, you need SharePoint Designer 2013.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @stujol80 ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
184 | |
51 | |
47 | |
32 | |
32 |
User | Count |
---|---|
265 | |
91 | |
78 | |
68 | |
67 |