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

Need to Copy a repeating section from a List-item to a repeating section to a different List-item?

Hi, I have been working with Nintex for a short period of time and have a requirement to copy a repeating section from an item to another item's repeating section.  (detailsSmiley Happy  the 1st item is a template with a part number, as the 'Title' key, with a repeating section which holds the dimensions of the part.  The user will create an item (Inspection item(document)) which does a list lookup, finds the part number, and needs to copy the repeating section in the template to the 2nd item being created.  On the template item I have a field which shows the XML of the repeating section.   How can I get the repeating section copied into the 2nd item's repeating section?  Can this be done with the List Lookup control?   I thought I could reverse the process by creating a text field in the 2nd item-Inspection sheet- and during the list lookup the xml is copied in  and the field textfield2 is connected to the repeating section2 .  will this work?

Reply
13 Replies
paul_crawford
Nintex Newbie

Re: Need to Copy a repeating section from a List-item to a repeating section to a different List-item?

Hi

What you have described should work as long as the fields in you repeating section match so the xml can be read by the form and display your data properly. If you don't want to change the xml in the process then the 2 repeating sections must be identical

Let me know if you need any more help

Reply
pam_lewis
Nintex Newbie

Re: Need to Copy a repeating section from a List-item to a repeating section to a different List-item?

Hi Paul,

I do have them set up with same names, types..the lookup is pulling in the xml from the 1st List item but not filling in the same name item-columns(fields) in the 2nd repeating section.  Below is the template item I'm using for the List Lookup.  You can see the multiple line field - ddText - has the information from the repeating section 1 (template).

Then, selecting the part number in the inspection document/ list with the same name fields is filling the same name multi-line field concatenating the values of dwgDimension & ddOperation.  These are the same names in 2nd repeating section.

both repeating sections have the same names DrawingDimensions with same field names - dwgDimension & ddOperation

ddText is a calculated value, using the Lookup function of the XML field in 1st List - returns the string of the 2 fields - strung together.

How to populate the repeating section field/columns respectfully?   Thank you for your help.

Reply
paul_crawford
Nintex Newbie

Re: Need to Copy a repeating section from a List-item to a repeating section to a different List-item?

Hi Pam Lewis

So you want the repeating section to update when the choice field at the top of form 2 is changed? Originally i thought you had a workflow automatically creating the second item.

Is the ddText enough if formatted correctly or do you have to populate the repeating section. It can be done through javascript, i would just need to remind myself how!!

Reply
pam_lewis
Nintex Newbie

Re: Need to Copy a repeating section from a List-item to a repeating section to a different List-item?

Hi Paul,

thank you for answering my questions..

Yes, the choice field in top of form 2 will be changed based on the drop-down list.  I don't have any workflows set up yet.

The ddText would need to populate the repeating section2 due to there may need to be lines added.

I don't know javascript.

this is what the complete repeating section1 looks like - 

thank you.

Pam Lewis

Reply
sojanm
Nintex Newbie

Re: Need to Copy a repeating section from a List-item to a repeating section to a different List-item?

Use the workflow to copy the repeating section data to the second item when saving the item 1

Reply
pam_lewis
Nintex Newbie

Re: Need to Copy a repeating section from a List-item to a repeating section to a different List-item?

Hello Sojan,   thank you for response.. could add a possible workflow chart of how this could be done?  or a link to any articles explaining how to do this?

Reply
paul_crawford
Nintex Newbie

Re: Need to Copy a repeating section from a List-item to a repeating section to a different List-item?

Hi

I have finally found time to blog this so please find it here:

This should give you a solution to your problem.

Let me know if you have any issues

Reply
paul_crawford
Nintex Newbie

Re: Need to Copy a repeating section from a List-item to a repeating section to a different List-item?

Hi

The workflow would only be able to create the second list item on save, it would not be dynamic to the lookup column.

If you can do this then the workflow would just need to create an item in the second list and update the multiline text field to be the value in the multiline text field in the first list

Reply
pam_lewis
Nintex Newbie

Re: Need to Copy a repeating section from a List-item to a repeating section to a different List-item?

awesome!!  I followed your steps and have 2 questions..  in the javascript code under function GetRSDateFromLookup() do I need to replace  ListA  with my name of my LIstA ?  I'm thinking yes!

I should replace where you used '.rsdata'  with my column name?

yes this is great & better to do it dynamically.

Reply