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

Question

Question

Update SQL Table from Forms Table

asked on November 12, 2013 Show version history

I have a customer attempting to update a Vendor table with new vendor information using Laserfiche Forms.  The LF Form consists of a Table with 4 columns that calls a Workflow to create the new Vendor's folder and update a SQL Table for other dynamic templates to use.

The Form table will allow for the addition of multiple rows to add more than one new Vendor at a time, but I am only having success with creating the first rows folders and sql data with the above workflow.  I have tried ForEachRow and ForEachValue.  The above Workflow pulls the table data, updates SQL, creates vendor folder, waits a minute (because it goes too fast), finds and copies a briefcase of folders into the Vendor's Folder.  It appears that it runs through the loop twice when 2 Vendors are entered on the form, but only the first is created in both the Repo and SQL.  Any ideas or advice?

 

1 0

Answer

APPROVED ANSWER
replied on November 18, 2013

Hey Levi,

 

First thing to check is that your activities are configured properly.  The problem you're describing is a pretty common one, and it's usually just a result of activities getting their data from the wrong place.  Here's what everything should be pointed at:

 

1. For Each Row - Make sure that it's configured to "Get Rows From" the entire table on your form.

2. Insert Data - Make sure the "Data to Insert" is coming from your 'For Each Row' activity.  I'm guessing this is where the problem is.  If you leave it pointed at the 'Retrieve Laserfiche Forms Content' activity, it won't work the way you're expecting.

 

I'm not entirely sure what's going on in your other activites, so I can't comment on how they should be configured, but any time you want to work with all the values in your table, make sure you point to the 'For Each Row' activity, rather than the 'Retrieve Laserfiche Forms Content' activity.

2 0

Replies

replied on November 12, 2013 Show version history

You should first check how you are using the information. You may need to use some sort of counter token to iterate through the positions of the information for more than just eh value you set the "For Each Value" token to be. You should also add in a Track Tokens inside the loop to check what values are being used in the current iteration. Doing this will allow you to also see how many times its been running through the values. 

 

If this does not help you find the resolution to your problem, then please report back with your findings as I am curious to see what is happening that it does not work as I have had no troubles iterating through table values from forms before and doing such types of activities.

 

EDIT: 

What I am trying to get at is for the use of "For Each Value" you are only going through the current value of one column but you need a counter to define the index of the other columns values that you need in order to get each rows value from the Form

0 0
replied on November 14, 2013

Did this not answer your question? I am curious if you have gotten this working or not

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

Sign in to reply to this post.