Patchell13
Canvas Initiate

Creating Copies of a Nintex Form and Modifying a Field Based on Multiple Choice

Jump to solution

Hoping someone can help because I seem to be a little out of my depth here;

 

So for starters I have a form that is assigned to an area based off a dropdown. What I want to be able to do is have a "Multiple" option that lets you chose more than one and once the form is "submitted" will create a copy for each choice made in the Multiple section and set that field value to each one of the chosen areas. For example, I chose A, B, C, D in the Multiple section and submit; 4 copies get made with all same info as original except each is assigned to one of the choices; Form 1 is assigned to A, 2nd assigned to B, etc etc.

 

I felt this would be done with a workflow. I know how to create a copy of a form and then assign a field a value but I do not know how to get this process to repeat x amount of times based on a number of choices made and how to loop it to procedurally go through the assignments in order and end loop once last one selected is assigned. I was thinking it had to do with storing the data as an array and making the workflow step through that array.. but I haven't been able to find a working example in my google search endeavor. 


Hoping you Nintex Gurus can help! Thanks 🙂

0 Kudos
Reply
6 Replies
Aleximo
Forms Fledgling

Re: Creating Copies of a Nintex Form and Modifying a Field Based on Multiple Choice

Jump to solution

Hey,

 

your workflow should look like this:

 

Aleximo_0-1617718072019.png

1. Nachschlagen in Liste:

 

First lookup the multiple choice field from ur element (filter: choose when id = id) and save it in a collection variable.

 

2. Regulärer Ausdruck:

 

now.... in my sharepoint (german) the multiple values are seperated through "," ... dont know if its the same in english... but you have to seperate them and save it in the same collection variable (or a new coll variable... doesnt matter)

 

3. Für jedes Element:

 

Now the loop... take ur collection variable and save new values in a text variable .. also make a YES / NO variable to know when to stop the loop.

 

4. Bedingung festlegen:

 

here u check if the text variable is empty.

 

5. Element erstellen:

 

if the variable is not empty it will create a new element.

 

you have to choose all the fields from ur form so that the values will copy... exept from the multiple choice field... the value should be the created text variable that u choosed in the "Für jedes Element".

 

6. Variable setzen:

 

Now if the text variable is empty u can set the YES/NO variable to YES and the loop is stopped.

 

7. Element löschen:

 

At the end u have to delete the current item because it would be redundant.

 

 

I hope that answers ur question. i just tested it and it worked fine...  let me know if u have any questions.

 

View solution in original post

Reply
Patchell13
Canvas Initiate

Re: Creating Copies of a Nintex Form and Modifying a Field Based on Multiple Choice

Jump to solution

Thank you for your reply and assistance with this workflow. I'm still learning so if you don't mind assisting me a little more that would greatly appreciated. If you're able to attach some additional screenshots of the actual steps I may be able to parse out what to do myself a little more (like what you have chosen in the actual list query setup window etc)

 

(example)

Patchell13_1-1617739066467.png

(I haven't selected any dropdowns because it could potentially include more business information than I want to leak publicly)

 

If I can see what you're doing in here I'm usually able to connect the dots. Asking because I'm a little unsure what you mean by "when ID = ID" in your first step explanation. Screenshots will help me realize when I'm just misunderstanding.


So I currently have a dropdown that references an existing Sharepoint list for the user to chose where the form is assigned. Its currently only single choice. I made changes now so that there is a multi choice option. I have this Multi field storing its data in a column and they are separated by commas.

0 Kudos
Reply
Patchell13
Canvas Initiate

Re: Creating Copies of a Nintex Form and Modifying a Field Based on Multiple Choice

Jump to solution
Also, when creating new item (new form duplicate) do all my fields in my original Nintex Form have to be associated with a column for this to work?
0 Kudos
Reply
Patchell13
Canvas Initiate

Re: Creating Copies of a Nintex Form and Modifying a Field Based on Multiple Choice

Jump to solution
Ran out of time to edit either of these posts..

This form also has attachments. I've been running through the steps and trying to get this figured out in the mean-time. However, I cant figure out how to get those attachments to copy over.

Also thought of potentially creating a copy of the form instead and then clearing the multi field and substituting the assignment field with the created text variable in the first loop then repeat but again cant figure out how to edit the newly created copied form to change these fields within the loop.
0 Kudos
Reply
Aleximo
Forms Fledgling

Re: Creating Copies of a Nintex Form and Modifying a Field Based on Multiple Choice

Jump to solution

Okay, i can show u some screenshots.

 

1. The list u choose is the list where u want the workflow to happen.

u filter the list with the ID from the current element (because u want the multiple choice value from the current element)

and in the last step u save the value from the multiple choice field in a collection variable.

Aleximo_0-1617779352674.png

 

2. i hope the screenshot explains everything.

 

Aleximo_1-1617779863010.png

3.

 

Aleximo_2-1617779926231.png

 

 

I think if u got this, the rest should be simple.

 

"Also, when creating new item (new form duplicate) do all my fields in my original Nintex Form have to be associated with a column for this to work? "

 

U have to copy the values u need... that can be all values or just a few... if ur list is really big... then u have to copy alot of values

 

 

"Also thought of potentially creating a copy of the form instead and then clearing the multi field and substituting the assignment field with the created text variable in the first loop then repeat..."

 

the problem is that u cant catch the ID of the new element if u copy it 1 to 1 ... and without the ID u cant change the value... maybe its possible but i cant do it.

 

 

"This form also has attachments"

 

have a look a this post:

 

https://community.nintex.com/t5/Nintex-for-SharePoint-Forum/Copy-list-item-from-one-site-to-another-...

 

 

0 Kudos
Reply
Patchell13
Canvas Initiate

Re: Creating Copies of a Nintex Form and Modifying a Field Based on Multiple Choice

Jump to solution
@Aleximo
Thank you very very much for this help. I got pretty much to the same point and it matched the images you posted. It was VERY helpful. I'm hoping to find a solution for Copy to maintain the attachments. Its crazy to me Nintex didnt include a way to capture the new copied item so that it can be edited easily with the Copy command. Im sure that would help streamline a lot of things for other users without a much more cumbersome process of Create, when not all fields may necessarily be assigned to a list column, and additional workflows when attachments are involved.
Regardless, thank again for your help!
0 Kudos
Reply