SharePoint copy list item to another list workflow

I'm new to using SharePoint's REST API and using it in a SharePoint Online Workflow - web services.

I have a custom list [we'll call this, list A] that users sometimes attached documents [mostly word, excel, image files, and pdfs].

What I need to do, is copy the custom list item and its attachment to another custom list [we'll call this, list B] in the SAME site, NOT to a Document Library. Basically, recreate the option "Copy List Item" that is available in SharePoint 2010 workflows, and was removed from SharePoint Online workflows.

I want to avoid creating and using a SharePoint 2010 workflow for this functionality. I'm sure at some point Microsoft will be discontinued SharePoint 2010 workflows, and I'm using REST API [web services] to perform the other tasks, associated with this SharePoint Online workflow.

I found this REST API information on Microsoft's site:

url: //site url/_api/web/lists/getbytitle['list title']/items[item id]/AttachmentFiles['file name']/$value method: GET headers: Authorization: "Bearer " + accessToken

accept: "application/json;odata=verbose" or "application/atom+xml"***

I use Fiddler 4 to test my REST API endpoints, and once I have them working, I'm able to then create a web service call in my workflow.

I was successful at getting the REST API endpoint to work in Fiddler, but I was confused with the results. Normally, when I test my REST API endpoints in Fiddler, and click on the Inspectors tab in Fiddler, what is normally returned, is a tree like structure:

d\data\results

But I don't see that. If I click on the Inspectors Tab, then on the HEXView subtab, I see the contents of the file. The raw data. I don't know how to grab this in my SharePoint Online workflow and then copy it to the target custom list [in the same site], after I have first created the list item in the target list [which I have successfully created and tested that code in my SharePoint Online workflow, using REST API - web services].

I have been able to copy a custom list attachment to a document library, and I have been able to create folders in a document library.

Stuck on copying a custom list attachment to another custom list item in the same site.

Video liên quan

Chủ Đề