Attachments from NWC form

  • 17 July 2018
  • 6 replies
  • 37 views

Badge +11

I would like to know how can I retrieve the attachments from the NWC start up form and attach them to the item in SharePoint list.

I'm using OneDrive as storage location. The collection of the attachments looks like this:

["{""path"":""/WorkflowFiles/a4319896-9b5d-4326-8b65-35570a217bb6/GetAllSiteColl.txt"


6 replies

Badge +4

Hi Kapil,

Attachments in NWC forms are stored in a Collection variable. To get the files within that collection you need to Loop For Each element of that collection and store the item of the iteration in a File Variable. Make sure the Store Item variable is of the type File. And then, the action you need inside the loop is the Add attachment to an item SP action that uses the file variable in the loop. Screenshots attached. Hope it helps.

217177_pastedImage_3.png        

217178_pastedImage_4.png

Badge +3

This was very helpful, but I have a follow up question.

 

What if I just want the file names of the attachments so I can build a string with a list of the attachments?  

Badge +11

Hi @mikeboggs23 ,

As i suggested in my question, you can retrieve the names of the attachments from the collection variable. Once they are saved in the temp location, you can retreive the name using Get File metadata action > OneDrive for Business. Hope it helps.

Badge +3
Yes, that is helpful. I'm not using OneDrive (Should have been more clear), but I am storing each attachment in Box. I should be able to use the get metadata action for Box to get the title and I never would have thought of that without your help. Thank you.
Badge +9

Can someone explain how I can get the dynamic Item ID in the field below?

 

8363iE559EF30177485F7.png

 

Userlevel 3
Badge +8

Hi, I think that is referring to your sharepoint item ID (Row ID), so you can retrieve it from your start event object:

24271iE4846BD0778896AE.png

Note: if your attachments is saved in a separate list, then you can use the query list action and create a new object for that list to retrieve the ID

Reply