cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Copying Document from Another Library into Workflow Library

Jump to solution

I'm setting up a workflow in a Document Library that will create a folder using the name entered by the user. Then the workflow needs to copy a document from another library into the newly created folder and update the name of the document. Does anyone have any suggestions on how to do this?

Here is an example of what needs to happen:

User navigates to form and enters account name: Testing

Folder is created called Testing

Workflow then needs to pull two documents from a different document library, copy them to the current library and update the name of each document to read Testing[DocumentName1] Testing[DocumentName2].

Thanks in advance!

Labels: (3)
0 Kudos
Reply
2 Replies
tomcastiglia
Nintex Newbie

Re: Copying Document from Another Library into Workflow Library

Jump to solution

Pablo,

I think the easiest way to do this is using Call Web Service action and call the Copy.ASMX service, specifically the CopyIntoItemsLocal method.  You'll need to specify the SOAP XML message for this, which looks like this:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/sharepoint/soap/">

  <soap:Header>

  </soap:Header>

  <soap:Body>

    <m:CopyIntoItemsLocal>

      <m:SourceUrl>{WorkflowVariable:SourceUrl}</m:SourceUrl>

      <m:DestinationUrls>

        <m:string>{WorkflowVariable:DestUrl}</m:string>

      </m:DestinationUrls>

    </m:CopyIntoItemsLocal>

  </soap:Body>

</soap:Envelope>

Below is an example of this action fully configured:

View solution in original post

Reply
DirkThiele
Nintex Newbie

Re: Copying Document from Another Library into Workflow Library

Jump to solution

Hi all,

 

I have two questions regarding this Topic, it would be great if I could get some assistance.

 

1. Lookup fields

I was able to create a Web Service Request that copies a document into a different library and it also gives the document a title by transmitting "FieldInformation" of type "Text".

 

However, I would like to transmit Lookup field data with the document as well but I have no idea how to do that.

 

By following the instruction...

<m:FieldInformation Type="Invalid | Integer | Text | Note | DateTime | Counter | Choice | Lookup | Boolean | Number | Currency | URL | Computed | Threading | Guid | MultiChoice | GridChoice | Calculated | File | Attachments | User | Recurrence | CrossProjectLink | ModStat | AllDayEvent | Error" DisplayName="string" InternalName="string" Id="guid" Value="string">
</m:FieldInformation>

 

I have created the following...

<m:FieldInformation Type="Lookup" DisplayName="DocumentType" InternalName="DocumentType" Value="{WorkflowVariable:num_docType}">
</m:FieldInformation>

 

For the value I have created workflow variables of three different types already but I can't get it working.

 

First I tried it with the ID (1) of the Lookup element, then with its Title (Training-Material), and also with a combination like this "1;#Training-Material".

 

I also tried with different types of variables like "String" "Number" "Integer" or "List Element-ID", without success.

 

The document is being copied but the Lookup value is not assigned on the receiving side.

 

Does anyone know what type of value is required for lookup fields?

 

2. Language issue
The second question is related to languages.

 

As I am working with two languages in SharePoint there is a German and an English Display Name available.

 

Depending on the language I have set in my user account the workflow was transmitting the Title or not.

 

When I use this code with German user account settings it is working but not with English.

<m:FieldInformation Type="Text" DisplayName="Titel" InternalName="Title" Value="{WorkflowVariable:slt_Title}">
</m:FieldInformation>

 

And when I use this code it is the other way around. Works with English but not with German.

<m:FieldInformation Type="Text" DisplayName="Title" InternalName="Title" Value="{WorkflowVariable:slt_Title}">
</m:FieldInformation>

 

So in the end I have added both lines and it seems to work fine for both languages, but I am not sure if this is the right way to solve it.

 

Also here I would be grateful for any help!

 

Best Regards,

Dirk

0 Kudos
Reply