Go deep into Nintex-add, update, and delete entries in the list

Source: Internet
Author: User

Add (New)

 

 <Batch PreCalc='TRUE' OnError="Continue"> 
<Method ID="1" Cmd="New">
<Field Name='ID'>New</Field>
<Field Name='ID'>Mingle</Field>
</Method>
</Batch>

 

 

 

 

Update)

Code

 <Batch OnError="Continue" ListVersion="1">
<Method ID="1" Cmd="Update">
<Field Name='ID'>{WorkflowVariable:ItemID}</Field>
<Field Name='Current_x0020_Days_x0020_Taken'>{WorkflowVariable:iDaysTakenYTD}</Field>
<Field Name='Days_x0020_Accrued_x0020_YTD'>{WorkflowVariable:iDaysAccrued}</Field>
<Field Name='Current_x0020_Accrual'>{WorkflowVariable:iCurPeriodEntitlement}</Field>
<Field Name='Days_x0020_Remaining'>{WorkflowVariable:iCurDaysBalance}</Field>
<Field Name='Days_x0020_Carried_x0020_Over'>{WorkflowVariable:iDaysCarriedOver}</Field>
</Method>
</Batch>

 

Use WebRequest to update the content of the InfoPath File

 

Code

 <?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>{Common:ListName}</listName>
<updates>
<Batch OnError="Continue">
<Method ID="1" Cmd="Update">
<Field Name="ID">{ItemProperty:ID}</Field>
<Field Name="FileRef">{Common:WebUrl}/{Common:ListName}/{Common:ItemDisplayName}.xml</Field>
<Field Name="BaseName">test</Field>
</Method>
</Batch>
</updates>
</UpdateListItems>
</soap:Body>
</soap:Envelope>

 

 

Delete)

 

 <Batch PreCalc='TRUE' OnError="Continue">
<Method ID="1" Cmd="Delete">
<Field Name='ID'>{WorkflowVariable:ItemID}</Field>
</Method>
</Batch>

 

If you need to delete an item from a document library you will need to use CAML and only the URL of the document shoshould be sufficient

<Batch OnError = "Continue"> <Method ID = "1" Cmd = "Delete"> <Field Name = "ID"> 1 </Field> <Field Name = "FileRef "> http: // {servername}/{LibraryName}/document. xml </Field> </Method> </Batch>

If you are trying to delete an item inside a list then you nedd to ahve the id an you can construct the caml something like this \

<Batch OnError="Continue"> <Method ID="1" Cmd="Delete">  <Field Name="ID">1</Field> </Method></Batch> 

Additional reading: http://connect.nintex.com/forums/thread/6929.aspx

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.