Multiple attachments downloads.

  • 24 October 2014
  • 2 replies
  • 16 views

Badge +3

Hello, 

 

I'm kind of new to the attachments on smartforms. I figured out how to do list attachments, attach multiple documents and such.

 

My question: is there a way to create maybe a button or a control that would download all the attachments brought back in a list view ? 

 

thanks for the help! 


2 replies

Badge +5

I don't think you'd be able to do something like this. The list view returned would be dynamic. So unless there is a built in feature to download everything from a list view (which I don't think there is) I'm not sure you would be able to exercise enough control to be able to make the button or control know how many items were in the list, and then download that number, etc.

I could be wrong but my gut feeling is, unless there is something pre-built that does that, it would not be a trivial task.

Badge +2

Hi Zack,

 

You can achieve it by creating the custom control. The most important thing is the unique ID that links to your form whether your store it to SQL DB or Sharepoint folder. In code behind, you need to retrieve the link path for each attachments and call context.Response.Write by passing link in the loop. You can retrieve the link path by calling the SmartObject that links to your SQL DB or Sharpoint folder.

 

If you are not familiar in creating a custom control you may refer to this link:

http://help.k2.com/onlinehelp/k2smartforms/devref/current/default.htm#Getting started with Custom Controls.html%3FTocPath%3DCustom%20Controls%7CGetting%20started%20with%20Custom%20Controls%7C_____0

 

Good luck!

Reply