Skip to main content

I came across this video (http://www.k2.com/smartformspurchaseorders_video) and I am needing to create the multiple file attachment view (seen around 5:40) that Eric Schaffer used in this video. The ability to add multiple file attachments to a smartform is a huge need for me right now.  Any help in pointing me in the right direction, will be greatly appreciated.

 

I will be publishing everything to a SharePoint site hosted within our SP2013 environment.

 

Thank you.

Hey Ryan,

 

There are a couple of way to approach this, I'll give you my 2 cents on it.  I'm not sure your skill level so let me know if you need more info on a particular topic.

 

After creating a smartojbect out of your List or Library, you basically just need to create a view from the Attachments piece.  For example, I created a smartobject out of my document library and I have the following methods available:

13446i57948203479715C6.png

And I will add a rule against those buttons to fire the methods associated with the smartoject from above: Create/Delete

 

Let me know if you need further explanation for a rule or view build.  

 


I created my SmartObject to my document library, and that matches your screen shot.  I have also created a view with the Get List method, and when I run the view, it pulls back the documents that are currently in the document library, but won't give me the option to upload a new file.

 

 

14260iDD7A291BCA3057A5.png


Yea, that view looks really good in 2013.  I'm still stuck on SharePoint 2010.

 

I'll show you what I do to take control of file uploads and maybe you can get something out of it.  

 

I wil start off with the listview that you generated, and then remove all of the rules under the Add button.  What I do for Add is when it's clicked I launch a subview.  When the subview is generated, the user puts in their file then they click save it is thrown into the list view.

 

The below is probably a little more complicated then what your looking for, but hopefully you get an idea of how you can control the data a little more when you use the subview.  The process would be click: Add > Click: Add Attachment > Click: Save > refresh the attachment list.  The smartojbect referenced below, I would subsitute it with the SharePoint Add Attachment method and map in the fields from the subview.

 

If you'd like to see something else, I will recreate your scenerio on my environment and try it out on my end.

 

12248i2226182BCE6B7220.png


My screen shot that I posted above was taken from K2 Designer.  I just styled my button a little differently than yours. Your solution would work for me, but I don't want users to see what files are already uploaded to the document library.  I am working on a Purchase Request solution, very much like the video I linked to in the orignal post.  I have a form users will fill out, and add their quotes to (as file attachments). The form will then be submitted to a list in SharePoint with the quotes as attachments to that list item.

 

I could do, and have done this in InfoPath, but that isn't an option.


So I have a view working allowing me multiple file attachments.  I also have (from my submit button on my SmartForm) the ability to create a document set inside of a document library.

 

My only issue now is uploading the multiple files to the created document set inside of my document library.

 

Any assistance would be greatly appreciated.

 

 


There are no methods associated with multiple file uploads.  

 

The only thing I can imagine on the form is for you to fire the add attachment method when the file is added.  Otherwise, you might have to look at a workflow.


What is the "add attcahment method" and where is it located?

 

I'm exploring the workflow as well. What should I look for there?


 

Have you created a SmartOjbect out of a sharepoint list or library yet?

 

Site Actions > K2 Site Settings > K2 SmartObject Site Lists and Libraries , select the lists and librarys you want to add to the K2 environment.

 

The method for a document library is actually create.

 

 


Yes, I do have a SmartObject from my SharePoint document library, and have the Document Set enabled as a content type.

 

My SmartForm will also generate a name, and create a document set with that specific name. My only issue I have is uploading multiple documents into that document set.

 

When the Upload_Document method fires in my submit rule, I then get an error message that tells me the list does not exist.

 

The list does exist, because the rule right before that (that fires and IS working) creates a document set with a specific name.


Reply