Hi,
Currently I try to upload a file to a Sharepoint 2013 custom list. The file is an attachment of the item.
What I do now is the following:
- Create a new list item with the 'Add list item' task.
- I retrieve the latest item added to the list using the Get list item(s) task and using a CAML query to retrieve the ID
- Finaly i want to add an attachment to the item by using the Upoad file(s) task.
The last action failes as there is no ID directory created when the item is added in step 1 without an attachment.
../Lists/[LISTNAME]/Attachments/
[ID]I get the error:
Exception in Task: System.Exception: Folder not found!
at SharePointTasks.Core.Tasks.UploadDocumentTaskParams.UploadFile(String source, Boolean sharePointOnline)
at SharePointTasks.Core.Tasks.UploadDocumentTaskParams.ExecuteCore()
at SharePointTasks.Core.Tasks.BaseTaskParams.Execute()
Also I used in the Destination folder the variable {TASK(2,StdOut)} for the ID, but it is not parsing the variable in there.
It only works if I add an attachement to the list using Sharepoint (browser), than the ID folder is made in the attachment folder of the list.
So two things here:
- Make the destination folder work with variables in the Sharepoint Upload file(s) task
- When uploading a file to a Sharepoint list, create the directory if it isn't there.
Hope to see this in the near feature.
Regards,
Erik
Uses Visualcron since 2006.