Skip to main content

11635iB5484EC75118DAA6.png


From a Sharepoint's perspective, to attach a file to a list item; a pop-up loads containing this list item and the "Attach File" button


 


10874i5CBF40E8931D88B1.png


When clicking on the "Attach File" button, another pop-up appear for selecting a single file.


 


13493i26C2E7E4264B38B7.png


One implementation to attach multiple files to a list item is as below:
A Smartobject of this list can be exposed using the "Sharepoint Content" broker:
http://help.k2.com/onlinehelp/k2blackpearl/userguide/current/webframe.html#the_k2_sharepoint_csom_service_content.html


 


15522i191244394B9F5AD4.png


14770i6E1B82FFD79A5D2C.png


An Item View/Form can be generated/created, with a parameter 'ListItemID' to accept the list ID


 


10668iABFB9CBE53D8CD2A.png


15377iAB153ED1018A7D46.png


12579iDFDE29DF28845720.png


This view has two rule configure:
1. On initialize, load the data using the "Get List Item" method with the parameter passed in (to return data regarding the list item)
2. On the "Add Files/Attachment" button click, load another view (an editable list view in which multiple files can be added/uploaded) (this would be the Add Attachments view)


 


11053iABDC2BBB6A97C1A5.png


The "Add Attachments" view can be generated/created with the "File" property with ootb edits methods, also add a "ListItemID" parameter so that this ID can be passed to this subview/form to use with the delete/add attachment methods


 


12349i013F216E95AC0541.png


Add an initialize method load existing files on startup


 


13481i6FEB704B4D5FF704.png


12463i257AB3060F62A1E3.png


The "Save" button and rules will perform most of the leg work, and will need to be modified such that it interacts with the attachment instead of the list item as below


 


14327i88DF7BBDAFA87A51.png


Now when running the Item view, information regarding list item is loaded


 


15289i788F8C0AD61B0F36.png


When clicking on "Attach File" the "Add Attachments" view is loaded with existing items


 


10872i9D6BB6E77B63D437.png


12158i5BFAD4C480693269.png


Single or multiple items can be added/remove and the "Save button" will handle the removal and attachment of multiple files


 


* There is likely more than one way to implement this use case

Be the first to reply!

Reply