cancel
Showing results for 
Search instead for 
Did you mean: 
vijay_kampu
Nintex Newbie

How to save multiline of text column with xml content

Jump to solution

Hello,

I have a repetating section with two text box and multiline of text . Saving the following result in multiple line of text column (plain text)

<RepeaterData><Version /><Items><Item><cmtAuthor type="System.String">Vijay</cmtAuthor><cmtDate type="System.String">&amp;#160;3/8/2018&amp;#160;1:49 PM</cmtDate><CommentsInfo type="System.String">test</CommentsInfo></Item></Items></RepeaterData>

I wanted to save this data in another's list multiline of text using call web service action 

<Batch OnError="Continue">

<Method ID="1" Cmd="New">

<Field Name="Title">{ItemProperty:Title}</Field>
<Field Name="Comments" ><RepeaterData><Version /><Items><Item><cmtAuthor type="System.String">Vijay</cmtAuthor><cmtDate type="System.String">&amp;#160;3/8/2018&amp;#160;1:49 PM</cmtDate><CommentsInfo type="System.String">test</CommentsInfo></Item></Items></RepeaterData></Field>

</Method>

</Batch>

I am not getting any error after workflow finish the task, however i am unable to see the data in another list. Can someone help me here?

Labels: (2)
0 Kudos
Reply
7 Replies
Automation Master
Automation Master

Re: How to save multiline of text column with xml content

Jump to solution

I guess you have to XML encode source data so that it looks like

<Field Name="Comments" >&gt;RepeaterData&lt;&gt;Version /&lt;&gt;Items&lt;  ...‍  ...‍‍

 

0 Kudos
Reply
vijay_kampu
Nintex Newbie

Re: How to save multiline of text column with xml content

Jump to solution

Thank you i encoded the data it works till RepeaterData as shown below

<RepeaterData><Version /><Items><Item><cmtAuthor type="System.String">Vijay</cmtAuthor><cmtDate type="System.String">&amp;#160;3/8/2018&amp;#160;1:49 PM</cmtDate><CommentsInfo type="System.String">test</CommentsInfo></Item></Items></RepeaterData

&lt;RepeaterData&gt;&lt;Version /&gt;&lt;Items&gt;&lt;Item&gt;&lt;cmtAuthor type=&quot;System.String&quot;&gt;i:0#.w|pncrnd\pl89164&lt;/cmtAuthor&gt;&lt;cmtDate type=&quot;System.String&quot;&gt;&amp;amp;#160;3/8/2018&amp;amp;#160;1:49 PM&lt;/cmtDate&gt;&lt;CommentsInfo type=&quot;System.String&quot;&gt;test&lt;/CommentsInfo&gt;&lt;/Item&gt;&lt;/Items&gt;&lt;/RepeaterData 

if i add "&gr;"  at the end SharePoint is not taking . Please suggest

0 Kudos
Reply
Automation Master
Automation Master

Re: How to save multiline of text column with xml content

Jump to solution

I think you'll have to use RegEx to replace the &quot; and all the other bits in there, to clean it up.

0 Kudos
Reply
Automation Master
Automation Master

Re: How to save multiline of text column with xml content

Jump to solution

I've tried with your data and following request worked for me

note I've added a XML preamble to your repeater data

<?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:UpdateListItems>
      <m:listName>testlist</m:listName>
      <m:updates>
        <Batch OnError="Continue">
          <Method ID="1" Cmd="New">
            <Field Name="Title">{ItemProperty:Title}</Field>
            <Field Name="Comments" >&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;RepeaterData&gt;&lt;Version /&gt;&lt;Items&gt;&lt;Item&gt;&lt;cmtAuthor type=&quot;System.String&quot;&gt;Vijay&lt;/cmtAuthor&gt;&lt;cmtDate type=&quot;System.String&quot;&gt;&amp;amp;#160;3/8/2018&amp;amp;#160;1:49 PM&lt;/cmtDate&gt;&lt;CommentsInfo type=&quot;System.String&quot;&gt;test&lt;/CommentsInfo&gt;&lt;/Item&gt;&lt;/Items&gt;&lt;/RepeaterData&gt;</Field>
          </Method>
        </Batch>
      </m:updates>
    </m:UpdateListItems>
  </soap:Body>
</soap:Envelope>

0 Kudos
Reply
Highlighted
vijay_kampu
Nintex Newbie

Re: How to save multiline of text column with xml content

Jump to solution

Thank you

0 Kudos
Reply
Automation Master
Automation Master

Re: How to save multiline of text column with xml content

Jump to solution

‌, did it work for you?

if so please mark the question answered

0 Kudos
Reply
vijay_kampu
Nintex Newbie

Re: How to save multiline of text column with xml content

Jump to solution

Thanks for the reply. Encoding did not work for me. I used web request action to call rest api, it worked for me

View solution in original post

Reply