Add Multiple attachments as individual items in a new SharePoint list

  • 30 March 2017
  • 1 reply
  • 31 views

Here i have requirement to add multiple attachments as a individual attachment in a SharePoint list?

 

For Ex:  I have added 3 attachments in a smartform and i need to create/add those 3 attachments as individual attachement in a SharePoint list(i.e each attachment should be added as attachement for 3 different items)


1 reply

Badge +9

Hi Prem,

 

 You can achieve this by following below steps.

 

 Step1: Create SmartBox to store Temp details

First Create a SmartBox to store document details "use this to store temporary details” of docs during document upload. Let’s name this as TempDocsDetails.

 

  • Keep The ID field with Type Auto Number
  • And Add another Field “Attach Document” of Type File.

You can add more fields as per your requirement

 

Step 2: Create ListView with TempDocsDetails SMO as data Source

Create a List View with Name “MultiDocUpload” to add Details in TempDocsDetails , By using TempDocsDetails  SMO as data Source for this.

 

Step3: Add MultiDocUpload view in SmartForm

Add view MultiDocUpload to smartform and write and unbound rule in smartform for Submit button click

  • When Button is Clicked
  • For All rows on MultiDocUpload View (Add Condition “for each item in a List View”)
  • Add Action to insert document in SharePoint List 
  • Then add action “Execute a SmartObject method “to delete records from TempDocsDetails SmartBox.

 

 

To Insert document in sharepoint List follow the below steps:

  • Create a smartobject around your sharepoint list or library with "create" method on the smartobject to upload the attachment to the list.
  • You can Create SMO from both SharePoint and SMO tester Utility.

 

let me know if it helps.

Reply