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

Question

Question

inserting multi value fields into SQL rows -

asked on August 25, 2020 Show version history

I am trying to insert data into SQL from an entry that has multiple multi value fields and non multi value fields.  Looking at other answers, I am trying to apply indexing, but I am getting two more rows in my database than I have entries in my multi value fields.  In fact it is repeating the last row two extra times.  I have two values in all the multi value fields but getting four rows in the database 

 

I repeat a similar step for both the Bill Days and the Meter Code to attempt to apply an index

 

From previous runs in testing the activity tokens are being reported as:

and :

 

I am needing it to insert into SQL with the following:

Billing_Days     Meter_Code

30                     MR

23                     AR

 

What I am getting is:

Any ideas what's producing the extra two rows to be inserted?

 

0 0

Answer

SELECTED ANSWER
replied on August 26, 2020

Are these grouped fields where maybe one of the items in the group is blank? It sounds like it

In the case it repeats 4 times it will always put the value of the highest indexed item even if it does not exist.

Another thing to check, maybe in the for each value token selector, you put in both the tokens you are iterating on when it should have only been one of them, since you really just want it to get an object count for you and loop through that many times.

1 0

Replies

replied on August 25, 2020

Your BillingDays value uses the ForEachValue_Iteration token twice. Is that intended?

0 0
replied on August 26, 2020

Thank you John !  it was the second item you identified.  I had both multi valued tokens identified in the "For Each Value" - Values Property thinking I had to identify everything to be captured, You just put an end to a frustrating testing piece on my first workflow to SQL effortsmiley 

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

Sign in to reply to this post.