You are viewing limited content. For full access, please sign in.

Question

Question

insert table into sql

asked on January 9 Show version history

Am unsuccessful using a for each value loop to get a multi row table injected into sql.  syntax is correct as I can get the data one line at a time into SQL, but when its a multi row table I'm struggling to get my indexed tokens to operate how I need.

I can select one value for the for each value loop, get the proper amount of iterations but can't get more than the one value to write properly.

I either need sleep, or someone to dumb it down for me so I can pull multiple values from each iteration of my for each loop.

 

**Edit: Using LF11 on prem

0 0

Replies

replied on January 9

Where is the table coming from?  Forms?  Or somewhere else?

If it is coming from Forms, it'll look something like this:

You would probably want to use "For Each Row" rather than "For Each Value" with the "For Each Row" activity looping through the table from the "Retrieve Business Process Variables" activity.

And make sure you are using the "For Each Row" version of the tokens within the "Insert Data" activity.

1 0
replied on January 10

Data is coming from a Forms table, yes.

The for each row was my first thought, however you can only run that on SQL query actions, not on my Retrieve business process variables.

0 0
replied on January 10

Got it sorted... guess i just needed a nights sleep :)

What I believe missed was setting the index to the iteration variable when writing.  Had quite a mess of testing in my workflow and had to just start over.

0 0
replied on January 10

I'm glad you have it working.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.