Skip to main content

Have you ever had a problem that you knew was possible, you've seen it before, or you just know that the fundamentals of the problem should be solvable.  We I will admit that I had one that stumped me for over two weeks.

 

I was talking to a friend of mine about using Parent/Child List items and how to automatically tie them together and create them within one form.  Without hesitation, I was like, "Sure that should be simple, just input information into one form, then use a workflow to sift through (loop) and create child items from the one list."  Note to self: Do not commit to a solution before writing it out!

 

Honestly that sounded really simple in theory and should have been, but when I started down the reality path of developing the solution, it became a real brainteaser.  I thought about using InfoPath, SharePoint, and Nintex Forms, but each time I got stumped at how to exactly get the child items into the list in the first place.   After spending several hours looking through this one night I ended up in tears.  Well let me paint the picture differently, it was so frustrating that I let out a cry for help.   Then as if by a stroke of genius, I figured it out and well, the rest is history.

 

So I am now writing this to save you from the long hours of pain of staring at your computer screen.  Please dont do that.  Its not worth it, just read through this, see if it makes sense, and then download the attachments and be happy.  Don't stare at endless errors wondering why the form or workflow is not working correctly.

 

Concept:

The premise of this is not for everything, but useful when you want to track Parent/Child Items.  What this will allow you to do is create one form for entering the Parent information and the child items, then track those items in two separate list for reporting and other options.

 

I will not go into the depths of SharePoint or Nintex on this, but communicate the concept and steps taken.  If you dont understand a certain step, shoot me an email and remember what I said above, please do not stare at this stumped its not that serious.  Really, thats why Im writing this, to show it can be done.

 

Kudos, Props, Much Thanks, Cheers. Hopefully you get the point

First off, thanks to Vadim Tabakman for the start of my solution in his blog.  I'm sure everyone that has looked at doing repeating tables in Nintex has read his blog in some form or another.  If not, umm...what are you waiting on, click here.  It was his workflow piece that I used to get the child items piece for my solution.  After going through each piece of his workflow, I was able to figure out what steps to add in to make the child list work.

 

Are you ready?  Lets dive in.

 

Step 1: Lets create our Parent and Child list.

Parent List: Test Repeat is the name I used for my list.  Click here to download the .stp file.

ParentList.png

 

Child List: Child List is the name I used for my list. I know really intuitive huh?  Click here to download the .stp file.

ChildList.png

Note: Remember this is a simple concept; you can do much more with this if you desire.

 

Step 2: Now lets modify the form on our Parent List.  To do this, got to your list, and select Nintex Forms (See screenshot).  If you want to get going quickly, click here to download the list templates which should include the form preloaded.  You can then skip to Step 5.

SelectNintexForms.png

  1. Delete the forms controls for MyRepeatingSection and DetailTable.
  2. Add a repeating section to your form
    1. repeatingsection.png
  3. Name your repeating section "MyRepeatingSection" and Connect it to the MyRepeatingSection column. (This is a testing step and is not needed if you know how to write XML. I recommend doing this only at the beginning.  This will allow you to grab the XML that you will need later in your query. )
  4. Drag the label and text field for FirstName and LastName into the repeating section
  5. Format it with colors or whatever as needed, then save and publish the form.

 

If you're a brave soul that wants to figure out some of this manually go to Step 3 first.

Form(ConnectedRP).png

Step 3: Create a test item to grab your XML and copy it to notepad to hold it.  Now go back to your form and disconnect your repeating section. Save and Publish it again so that its setup correctly for the workflow.  This is IMPORTANT, so that your workflow will work correctly.

grabxml.png

Form(NotConnectedRP).png

Step 4: Create the form, import the template, save and publish it.

Form(Complete).png

Step 5: Create a Nintex Workflow connected to the Parent List.  Use the blank template and when it opens up click on Import.  Click here to download the workflow to use as a template.  I am choosing not to go into details so that this isn't a really, really long blog.  But, don't fear, I have attached the screenshots for each action in a zipped folder for you.

CreateWorkflow.png

 

Step 6: Once the workflow loads, ensure that each action does not have an error on it.  If it does, double click on it and configure the settings.

Updated

 

Based on some feedback and the workflow not importing the UDA correctly, I have added that as an attachment below. The Get Forms Repeating Data UDA needs to be imported before the workflow will work. It will still need configuration, but this should help out.

Step 7: Test your form and workflow.  This should work and you should see an output of the data in the list view as shown below.  If you are not seeing that, go back and make sure you have your fields named correctly and that your workflow ran with no errors.

ParentListWItem.png

------- Parent List Output Above -------

ChildListWItems.png------- Child List Output above -------

 

That's it.  You have just created two list, a form and a workflow that will generate child list for your users.  This application can be used for many things, and hopefully gets you started in the right direction for a solution.  Now that's what I call ninticity‌ which is short for simplicity with Nintex cool.png.

 

Oh yea, one more thing, share your comments and thoughts on it, what would you have done differently, and do you have any cool tricks with the table that you can do?

 

Happy Nintexing,

Eric

Anton,

Thanks for the suggestion.  What you mentioned is possible and I could have added more logic that would account for that. 

This example was meant to show how to connect and use the workflow to sift through the items from a repeating section.

I may add that as an upgrade to this post in 2016 :-)


Hi Eric,

I am new to nintex and trying to do some hands on training. I have downloaded the files and having following queries:

  • I am not able to understand step 4 ,We have already created and published the form in Step 3 didnt make any change so which form to create and  which template we need to import?
  • I am getting error in UDA after importing the workflow  ,Can you tell me what may be the possible issue?


Thanks for using this.... You may have to download and import the UDA first before loading up the workflow file itself. Take a look at this blog for that. Nintex Forms/Workflow - Parsing Repeating Section Data - Vadim Tabakman.


Thanks a lot Eric, Whenever we are exporting and importing the workflows with UDA we have to first import the UDA in new environment then import the workflow and add the UDA to it? After resolving all the errors and importing UDA separately I got the following errors in  UDA:

This is causing the error I guess.

This was the error, I was adding "MyRepeatingSection"from itemproperty which was causing the error.I will keep the screenshots of the errors I have faced which may be helpful for the new Nintex user


I have been able to use this solution but when I use a people picker in my repeating section I get the user name instead of the display name.  Is there a way I can show the display name in the table?

Thanks

Jennifer


Eric, great work man.  Just wanted to say thanks this has helped so much  !   Cheers Scott


Scott, thanks for the shout out. Always good to know that something has been helpful.


Joel,

I will try to help as best I can without seeing your form setup.

Based on the comments, it looks like your variable types in the workflow aren't consistent with the field types in your list. That's just a hunch, but try correcting that. Also ensure your UDA is installed as that tends to be another issue people have run into.


All,

  I am trying to achieve this functionality for Office 365 but some of the controls are not available. I have read communication between ‌ and Chris Sheldon but still it is not clear for Office 365 instance. 

 Is there anybody who has achieved the same for Office 365 or any other thread which I could follow ? 

‌ - Your thoughts please.

Thanks,

Rahul


Hi Patti,  Did you ever find a solution this having two repeating sections in the same form?  I am doing the same thing but I actually have 3 repeating sections in the same form.  Any help would be greatly appreciated.

thanks

Chantal


Hi I am looking to try and implement this Nintex for Office 365 / SharePoint Online .  I wondered if anyone has attempted this , with the obvious exclusion of the UDA?

Daniel


Hi Eric,

thanks for this work! I’m having a problem when items get created in the child list, and being new to Nintex does not help either  . I’m using your UDA and workflows but every time I edit the repeating section (enter new fields) all the previous items in the repeating section get created again in my child list. Is there a way to avoid this? Please be gentle in your response and I would appreciate you being as descriptive as possible.

thanks so much!

Licet


Licet,

Can you explain your statement,

"every time I edit the repeating section (enter new fields) all the previous items in the repeating section get created again in my child list"

 

I'm not sure I'm following what the problem is you are seeing. Are you editing this in a new form or once a form is already filled out you are going back in to edit the form?

One note, on the workflow you can change some logic so that the workflow only runs when a new form is updated. However, this may not help if you want to keep items in sync with each other. 


Good morning Eric,

My repeating section has two fields inside: “call date” and “call notes”. The purpose is to enter the date and notes of a phone conversation. Every time I log in a new date and note, my child list “reads and records” all the previous dates and notes for the same item.

I added a condition that if an item already exists within the repeating section, then update only if changed; otherwise, if a new date and note is entered then create an item.

It seem to be working for now.

Thanks again,

Licet


Eric,

I've been able to successfully duplicate your work in SharePoint 2016 On Prem using Nintex 2016 - Thank you!

Does this workflow usually take a long time to complete?  It seems like it takes a very long time. In my Repeating Section, I add three first and last names and submit the form.  It takes several minutes for the workflow to loop through the XML produced by the repeating section, create the child items and update the DetailTable field.

I hope that I'm doing something wrong but I've double checked my work against your screen shots and it seems to be correct.

Thanks,

Dave


‌, may I know how you checking if the item is new or was there previously in the repeating section?


I'm trying to create items in a new list using data from the repeating section, after creating items in new list, I want to update my repeating section with the ID value of the new list item. How to update the form data? I would like to avoid using MLT to update the repeating section (what if end user modifies something in that ???)

 

Thanks.


Thanks for posting!  For each action worked better for my purposes.


Eric Harris,

Is there a way to create child items only for items modified in repeating section row?


Hi Eric Harris‌,

In the repeating section of a parent list, create a field called child's item id. When you create an item in child-list, grab that id#, you'll have to convert that id from int to string and save it in parent list. You will only create child items if that field is empty.

Let me know if you have any questions.


You can do more work to determine if the items are modified, then create child items from that. I didn't spell that one out, but it is definitely doable.


Thank you Eric Harris and Kunal Patel,

Actually, i have counter on the form to check how many repeating section row items are remaining approval. If remaining is greater than zero then loop until remaining equals zero. There is a review task inside the loop for reviewers to approve repeating row items. After each items are checked(yes/no) or approved, then it creates item in another list, which eventually updates SQL table with execute SQL action. 

The thing is that, i do not want to create duplicate for already approved items or already created items and just create new approved items. I have moved on with this and placed item creation outside of the loop so it only creates items after remaining approval is 0.


Bright Light‌, as I mentioned before you can use child item's ID to avoid duplicate.

  1. Let's say you have created a new item with 3 rows of RepSec
  2. Now for each row, you have created 3 child items (since it was never created before)
  3. You've added 4 more rows in RepSec
  4. If you run the workflow now, it may create duplicate items based on your logic
  5. To avoid this, when creating a new item first time, you bring that item's ID to parent-child and update the corresponding row in the RepSec in parent list.
  6. So next time when you've added 4 rows, you will create child items ONLY for which Child Item ID field in parent list's RepSec is empty.
  7. This will guarantee that you don't create duplicate items in the child list.
  8. Also, in parent list's RepSec, put a rule and make the filed of child item ID read-only for all 3 views so that no one can modify it. This will ensure the relationship of RepSec row with child item.

I hope this will be helpful !!!


Hi Eric.

 

Hope all is well my Nintex fellows.

I tried your post “Create Parent/Child items using this Nintex forms/workflow with this trick” @ https://community.nintex.com/community/build-your-own/blog/2015/01/05/create-parentchild-items-using-this-nintex-formsworkflow-trick and it worked for One repeating section and the column I managed to populate in one workflow with one Action Set. In the same workflow when try with the same actions (all pointing to different variables including a new numIndex named CarInHisNumIndex) with a different Action Set (running serial not parallel) it just keeps looping pas the initial repeating entry I make. If I made two entries in the second repeating section, the workflow does keep running (In Progress) but when I look the log history action in the second set I see it keeps looping and creating black entries in the second child list and of course the workflow history list (I actually have to cancel it). Any ideas please?

 

 

 

I would very much appreciate your help.

 

 

 

 

Regards, Larry Saytee

SharePoint Administrator


Hi Erik,

Thanks for such an awesome solution.  I use it all the time in my work.  :-)

If anyone needs to add the ability to not have additional form submissions add duplicate items to the child list, I added the below actions to the top of the workflow.  I collect the IDs of the child list item into a collection variable.  Then I use a "For each" to delete each of the items with those IDs.  Then the rest of the workflow runs.

See screenshots for more details.

Cheers!

Tena


Reply