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 🙂
Solved! Go to Solution.
your workflow should look like this:
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.
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)
(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.
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.
2. i hope the screenshot explains everything.
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: