Nintex_Andrea
Moderator
Moderator

Re: Repeating sections - how to get the data

Jump to solution

@DavidAD , please reply with some screen shots of your workflow and action configuration.

Reply
DavidAD
Scout

Re: Repeating sections - how to get the data

Jump to solution

Thank you. Here's the repeating section of the form:

DavidAD_0-1620843837846.png

The account number and two suffix fields are Text - Short fields (though they will contain numbers).

Here's the beginning of the workflow:

DavidAD_1-1620844045124.png

So once the form is submitted, an item is created in SPO with basic data: the employee's name, employee number, request type, and date. Then, as you can see, variables are created for each of the five fields in the repeating section.

Here's the rest of the Loop for each action (as you can see, some of the actions are disabled, because I was testing). I've added an Update items action for each set of the data, up to the limit of six, so that the data will write to a different set of columns in the SPO list.

DavidAD_2-1620844444479.png

To update the item in SPO, I'm using three conditions each time: that the data must match the employee name, ID, and date. Plus, for the first set of repeating-section data, I'm also making sure that there's not already a value in two of the fields:

DavidAD_3-1620844910191.png

For the second set of data, the account number could be the same as in the first set or it could be different. So when they're different, I've set the conditions like this:

DavidAD_4-1620845107920.png

If the account numbers are the same (less likely but possible), the conditions are:

DavidAD_5-1620845173853.png

(If the account number is the same, the two suffixes in this set must necessarily be different from the first set.)

Anyway, it all works up to this point. But I can't seem to come up with the right condition(s) for the rest of the data sets - it seems to write the third set of data to the second set of list columns, and then nothing else. At one point it was also stuck in some kind of infinite loop where it kept repeating the Create an item actions.

I have a feeling there's a simpler way to do this, but I can't figure out what it could be. Any help you can give is much appreciated! Thank you.

 

 

0 Kudos
Reply
fairpoint
Scholar

Re: Repeating sections - how to get the data

Jump to solution

Hi @DavidAD. I must be missing something incredibly basic - it really is driving me a little batty. This is what I'm getting:

 

Start the for loop and point it at the repeating section

fairpoint_0-1620994279453.png

Start the set variable: 

fairpoint_1-1620994403872.png

when I try to set the variable value from the repeating section fields, those values are greyed out:

fairpoint_2-1620994607157.png

so I can't assign them as values

 

Does that make sense?

 

The only way I can think of around this is horribly inelegant so I would prefer it if there were a better way. What am I missing?

 

Thanks a mil

M

 

0 Kudos
Reply
DavidAD
Scout

Re: Repeating sections - how to get the data

Jump to solution

Hi, @fairpoint - in the Set a variable value action, are you creating a variable to store the data? In the Variable field you should click Add variable and create a new variable:

DavidAD_0-1620997611840.png

Then, in the Value field, click the +Insert tab. Select the Loop for each category and you should see your Loop for each action listed as an Object.

DavidAD_1-1620997933868.png

Click the arrow on that Object, and you should see a Current item Object. Click that arrow and you should see the fields in your repeating section. That's where you choose the one you need.

DavidAD_2-1620998265523.png

Does that help?

 

Reply
DavidAD
Scout

Re: Repeating sections - how to get the data

Jump to solution

Hi again, @Nintex_Andrea - I think I finally figured out my issue with writing the data from my repeating section over to SharePoint Online. One more condition in the Update items action seems to have done the trick. Thanks for your help!

Reply
Nintex_Andrea
Moderator
Moderator

Re: Repeating sections - how to get the data

Jump to solution
@DavidAD, I'm glad you were able to solve your problem! Great job! I'm sorry for my delay in response. I'm just getting back to this today.
0 Kudos
Reply