Solved

How to add data and create new rows in repeating section?

  • 7 August 2019
  • 4 replies
  • 161 views

Badge +12

Hi,

 

I've a list which I'm querying and getting list of users and I've to populate that in a repeating section of another list.

 

Using collection operation, I know the count of users which I can use to for indexing the rows in update XML but I'm having difficulty creating the XML for the row and the complete XML of that repeating section. I'm trying to use Add a node option.

 

Can anyone help me? Please share the screenshot of update XML configuration if possible.

 

Thanks.

icon

Best answer by SimonMuntz 7 August 2019, 02:42

View original

4 replies

Userlevel 6
Badge +22

Hi,


Lets pretend that my existing XML looks like below and I want to add a couple more names to it.


<?xml version="1.0" encoding="UTF-8"?>
<RepeaterData>
<Version />
<Items>
<Item>
<People type="System.String">i:0#.w|nintexart</People>
</Item>
<Item>
<People type="System.String">i:0#.w|nintexhomer.simpson</People>
</Item>
</Items>
</RepeaterData>

To add more names I would need to add more nodes in the format:


      <Item>
<People type="System.String">Name Here</People>
</Item>

So the Query XML action would look like this:



Workflow design would look like this.



 

Badge +12

@SimonMuntz thanks for your response.


 


Do I need to update item in every for loop? Can't I store the column value in the workflow variable, then use that variable as XML source and update the same variable with a new node information and at the end of for loop, update the item?

Userlevel 6
Badge +22
Hi,
With any solution there are always plenty of ways to go about it.
I think your suggestion will work and would make the workflow more efficient and put less load on the environemnt.
Badge +5
This worked perfect for me. Thanks!

Reply