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

How to write data back to a repeating section

Jump to solution

Good day fellow Nintexers.  I need your brains to help me on this one.  I'm trying to figure out how to write data back to a repeating section for a much larger application, but have built a test case for simplification of learning.  Here is my scenario:

 

I have a repeating section bound to a Multi-line column.  In my repeating section I have 3 Single Line of Text boxes titled "First Name", "Last Name" and "Full Name".  I want to enter a first name (Obi Wan) and then a last name (Kenobi) and start with "Full Name" being blank.  The work flow already gets the XLM, divys up the data into two collections.  I can even build the collection called FullName that consist of the union of the two (Obi Wan Kenobi).  What I cannot seem to do is correctly write back this data to my repeating section. 

 

It works fine for one name, but if I have multiple it either applies the very last full name to each "Full Name" location on the list or plugs in the entire collection varible to each "Full Name" location. 

 

I cannot figure out how to write the data back to the specific index where it should be.  Below is the screenshots of my flow.  What else do you need?

Labels: (1)
Reply
4 Replies
allan
Nintex Newbie

Re: How to write data back to a repeating section

Jump to solution

What you have to do is store the XML in a multiline plain text field.
You will have something like this:

<?xml version="1.0" encoding="utf-8"?>
<RepeaterData>
    <Version />
    <Items>
        <Item>
            <Lastname type="System.String">Kenobi</Lastname>
            <Firstname type="System.String">Obiwan</Firstname>
            <Fullname type="System.String"></Fullname>
        </Item>
        <Item>
            <Lastname type="System.String">Organa</Lastname>
            <Firstname type="System.String">Leia</Firstname>
            <Fullname type="System.String"></Fullname>
        </Item>
        <Item>
            <Lastname type="System.String">Solo</Lastname>
            <Firstname type="System.String">Han</Firstname>
            <Fullname type="System.String"></Fullname>
        </Item>
    </Items>
</RepeaterData>


In your workflow, just query XPath to get the 3 items, and get the firstname and the last name.
You can now update the XML from the item with your new value, by doing a update XMl or a string replace for example :
Replace '<Fullname type="System.String"></Fullname>' with '<Fullname type="System.String">{varFirstname} {varLastname}</Fullname>'
Create the new XML to store in your loop.
You then just have to update your field with the new value of text.

Reply
eharris04
Nintex Newbie

Re: How to write data back to a repeating section

Jump to solution

thanks @allan for the response. @cbeene did this solve your issues or help you out?

View solution in original post

0 Kudos
Reply
cbeene
Nintex Newbie

Re: How to write data back to a repeating section

Jump to solution

Wierd thing, I never saw Allen's response.  


I did get it fixed two weeks ago however and should have reported back here.  

 

It was a rookie mistake.  I have security actions by line item in the WF.  I couldn't write back to the list AFTER the WF ran once on that item because I didn't have permission.  Thanks for everyones help however.  

Reply
eharris04
Nintex Newbie

Re: How to write data back to a repeating section

Jump to solution

@cbeene can you mark which response closely solved your problem, if none, then mark your resolution as the main one.  Thanks and glad you got it working.

0 Kudos
Reply