I've followed the guide by Shane Young for uploading files via PowerApps to a SharePoint library. I'd like to build on this by showing the document properties in an editform below the upload so that the user can populate and save this information.
What do I need to put into the Item field on the Form to get it to pull the newly uploaded file?
Solved! Go to Solution.
Yes to both, the 'incompatible type' error is on the Item property of the form, and the data source is linked to the SP Library. 😐
I've tested uploading a file and it has been uploaded to the library once.
I had to ask one of my fellow Appstronauts @WarrenBelz for some advice re: your issue and his response was that the reason LookUp( Library, ID=varFileID) shows no data is because the Flow hasn't finished running before this formula runs, if that makes sense? Something I hadn't considered.
There are a couple of ways to handle this:
1. Provide users with a Refresh button/icon and ask them to wait 10sec before clicking it
2. Setup a timer, either on the same screen or a separate screen, that activates a loading spinner, runs for 10sec then OnTimerEnd refreshes your Library
3. Get users to add the meta data first then use 'Update file Properties' in your Flow to add the document after
Basically, the time it takes for the Flow to run is the issue with the Form not populating so you need to work around this with one of the above options.
Let me know if you need further help setting any of these up.
Hi Eelman (and WarrenBelz!),
Thanks again for your continued help 🙂
On the upload screen, I also have a button to launch the uploaded file Launch(varFileLink) and a label displaying the URL to the newly uploaded file (varFileLink).
These only appear once the file has completed uploading and the information contained in these is dependant on the Flow having run.
I have put in a refresh button and tried uploading a file & refreshing numerous times after the upload is apparently complete but the Form continues to remain blank.
Could I ask, how would I set up doc properties first then prompt the file upload?
Just a thought - I can use 'Last(clearcollectforlibrary)' on the form and this has successfully updated the item properties. Other than I assume potential clashes if people uploaded at the same time, are there any issues with me using this function to populate a new document's properties?
/Ok it was working until I was trying to build in a function of clearing the attachments upload & variables and now it's gone boom 😞
I wouldn't use Last() for exactly the reason you outlined ie you have no way of knowing which record you are updating. Using Set() ties your attachment to a variable and then you definitely know which record you are working on.
Im not sure what's gone 'boom' with your code.
I think we need to look at this problem differently because the Flow you are following is rather specific and messing with it is getting you into grief. How about using a Gallery as a different solution?
You could upload your files, as per the original method, then users are navigated to a gallery screen which shows all the uploaded files by name. Users can then select the file they want to add metadata to and get taken to another screen with the form. Simples
Hi Eelman, I think that might have to be the resolution, I was hoping for less navigational clicks but perhaps what I'm asking PA to do is outside of its capabilities just yet 🙂
Powerapps is capable of doing what you want, however it's just a little fiddly. If I get time I might have a go at creating what you want just to prove this 🙂
Check out new user group experience and if you are a leader please create your group
Check out how to claim yours today!
Test your skills now with the Cloud Skill Challenge.
We are excited to announce that Demo Extravaganza for 2021 has started!