I am stuck at the moment with a requirement at a client. They are using the SharePoint content service to access document libraries to store and retrieve documents.
This current requirement is to retrieve a list of documents, display it in a listview and then to have a button on the listview that will download all the documents displayed.
I have yet to find a way to do this as the SmartObject doesnt allow you to specifically download files as a batch.
Can anyone please shed some light on this ?
Solved! Go to Solution.
Out of the box, there is no method for downloading multiple files at the same time from a SmartForm. If you are looking to implement this functionality, you will likely have to implement a custom control. It would likely have to iterate through the documents on the list and add them to a single download. This will more than likely cause a significant hit to performance, as it would require having the control download all the documents in the users place so that the user can download them all at once.
I have played around with the for loops in 4.6.10 and found a way to download the files in a list view with a button click. I have the assumption that everything displayed on the list view has been filtered as per your requirements. Also, I have only tested this on Chrome and Firefox.
1. I have a list view which displays the files I would need to download. I used the OOB smartobject to store the files
2. I added three additional controls aside from the list:
- Data Label: where we will inject the script
- File attachment control: where the files on the list view will be loaded one at a time
- Button: on click will download all files listed
3. When the button is clicked, add the condition: For each item in a List View. Configure it for ALL rows
4. Then on the smartobject tied to the list, add the action to execute the Load method
The label ID is from here:
Hope this helps.
This is exactly what I was looking for, I got it working on the second time around. Thank you very much, a well deserved Kudos.
Just ran into a snag.. This works great with Chrome, but Internet Explorer will only download one file. Any one else have issues with Internet Explorer?