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

Question

Question

Cycling through tokens to import data into SQL table in Workflow

asked on August 2, 2017 Show version history

We are using Forms to fill out a compliance report with 80 questions. Forms is passing the 80 answers as well as 80 comment fields. Each question/comment has a standard name: question1, question2, comment1, comment2, etc.. Using "Retrieve Laserfiche Forms Content" each question and comment is returned as its own token resulting in 160 tokens. We then want to import all of these into a SQL table using "Insert Data". Each row in the table will contain one questions and one comment. Is there a way to loop through all these tokens or am i stuck using 80 "Insert Data" fields?

0 0

Replies

replied on August 2, 2017 Show version history

Since it sounds like you have them in a table, retrieve the Table (the entire table, not the individual columns) with Retrieve Business Process Variables, then do a "For Each Row" and it will give you access to each column in the row.

However, that depends on how your SQL table is structured. If you're using the same columns each time, then the loop will work.

0 0
replied on August 2, 2017

Hey Jason,

They're not in a table. Each question has a variable type of "Radio Button" and each comment is "Text".

0 0
replied on August 2, 2017

Are you not using a table because you'd like to have them displayed on the form on separate lines? A collection might serve you better if that's the case while providing the same functionality as a table when it comes to iterating through rows.

1 0
replied on August 2, 2017 Show version history

Like Miruna said, a collection would help. There's a couple things that will influence what exact approach to that might be the best option:

  1. What does the layout look like? i.e., how are the questions/answers grouped together?
  2. Are the "questions" written up in the radio button label?
0 0
replied on August 2, 2017

Layout is question in one line then comment then file upload. Each in its own line.

yes we've written the question in the label.

Ill try setting up another form using a collection. This sounds like it could be the solution.

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

Sign in to reply to this post.