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

Question

Question

Insert multiple Forms sections into SQL table using Workflow

asked on August 8, 2014

I am trying to create a workflow that will insert the data from each repeated section in a form into a SQL table.  This works fine if there is only one instance of the section used.  However, if the user clicks "add" to repeat the section and enters data into multiple sections, only the first section is entered into the SQL table.

0 0

Answer

SELECTED ANSWER
replied on August 8, 2014 Show version history

Yes, it will work the same. For the top fields, the token will stay the same, for the fields in the collection, you'd use the token from the For Each Row iteration.

0 0

Replies

replied on August 8, 2014

Right, that's what i thought. It's not that simple. The tokens generated by Retrieve Form Content for tables are multi-value tokens. The Insert Data activity uses single values since it only inserts one row. So it takes the first value from your token only. In order to go through all the table rows, you need a For Each Row activity. Inside it, you can insert the current values into the table.

 

2 0
replied on August 8, 2014

Can you post a screenshot of your workflow?

0 0
replied on August 8, 2014

Hello Miruna, Thank you for your quick response.  The workflow that I have is very simple.  It is started after an approval is given in Forms and simply retrieves the content from the form and inserts to the db.

 

0 0
replied on August 8, 2014

Will this apply to collection the same as it would a table?  The top section of the form stays constant as it needs to be entered into the table but there can be multiple entries of sections if the user wishes.

 

Thanks,

 

Glenn

 

0 0
replied on August 8, 2014

I should add that after adding the "after each row", I submitted a test form with 2 sections filled out there were 2 rows of data entered to the db rather than just one, but it duplicated the first section rather than moving on to the second section.

0 0
replied on August 8, 2014

I didn't see the addition of the token from the Row Iteration, that resolved the problem.  Thank you for your help Miruna.

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

Sign in to reply to this post.