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

Question

Question

Table values in one textbox

asked on March 23, 2016 Show version history

I have a form that allows users to add up to 5 lines. The columns are called "Year" and "Term". In my workflow I capture tokens for Each Row and I allow multiple tokens in order to make my list work. Then in Fill Out Form action, my tokens have an Index applied - each row will be a certain number (so the "Year" and "Term" tokens in row one will have value index of 1, the row two will have value index of 2 etc). 

The problem is that (out of 5 possible rows) if I only add 2, then the last 3 will populate with the 2nd value. Does anyone know how to fix this?

 

Thanks!

 

Resolution:

My VAR Terri Neal from ImageNet helped me with this, Brandon was on the right track so I will select his answers as the answer.

 

Assign Token Value, using Create, name your new token, and make sure it allows multiple values, however you shouldn't select anything in the values.

 

Now add For Each Row and select your forms table.

 

Within the For Each, add another Assign Token Value, but this time do a Modify. Activity should point to your first Assign Token Value. In New Values add your two tokens "ForEachRow_Term, ForEachRow_Year" (this is because I want these two values together in the same field but separated by a comma and a space). Make sure to select Append to existing values.

 

In the Fill Out PDF Form, select your second token then you can Apply Index from Token Dialog Window to decide how will values be separated, I needed Line Break.

 

0 0

Answer

SELECTED ANSWER
replied on April 20, 2016

Glancing back at your screenshot again, you're creating the token within the For Each Row loop, you actually want to create it prior to the loop, and then inside the for each loop add another token activity that appends the values.  Also make sure the multivalue checkbox is checked for your token.  

0 0

Replies

replied on March 23, 2016

If I'm understanding right you're pulling values from a table in Forms up to 5 rows, taking those values and plugging them into a PDF form with 5 rows in it, and if you don't use all 5 rows it just duplicates the last values?   I think I've run into this before, and you probably went in and set each individual field in the PDF form to use %(Token) with index 1, then the next row you used index 2, index 3, etc..  What you should actually do is use the PDF Form table feature.

Inside the PDF form configuration where you set the field values there's a 'Table' tab at the top, choose that.

You'll need to make sure your PDF form fields are named properly like TermField1, TermField2, etc..  As you long as you can Pattern Match them together, then you can use this Table function to fill out the PDF Table properly without giving you the indexing problem you're having.  

There's also a section in the help file that may explain things a little better as well.

https://www.laserfiche.com/support/webhelp/Laserfiche/10/en-US/administration/#../Subsystems/LFWorkflow/Content/Resources/Activities/Fill Out PDF Form.htm

0 0
replied on March 28, 2016

Actually - the form can have up to 5 rows, then in the Fill out PDF I have a single field to plug all in (I do not have 5 rows in the pdf). I don't believe that the table will work in this case?

0 0
replied on March 29, 2016

Ahh, well you'll probably need to loop through form token and pull the values into a user created multivalue token.  Then when you plug in the values into the form fill activity you can use the multivalue token and index it separated by Colons, or some other character.

0 0
replied on March 30, 2016

Brandon, could you please explain this a bit more?

0 0
replied on March 30, 2016

Each column in the table in Forms generates a multi-value token through Retrieve Forms Content. You don't need to run it through For Each.

If the PDF is a single field, then insert the column token, right-click it and choose Token Editor from the context menu. In the Apply Index section, choose how you want your values delimited.

1 0
replied on March 31, 2016

Ok that works if I have only one token per field, (I am using Apply Index- separated by Line Break). My goal is to have the whole row from the form (so in this example Year and Term would be one whole row, ex: 2014, Spring), represented in a single field. Here is the form example

With Miruna's suggestion it fixes my fill out pdf, but you can see that it will not let me "join" columns.

0 0
replied on March 31, 2016

Here is my setup:

0 0
replied on March 31, 2016

Yeah, ok, if you're combining tokens you'll have to go through the with For Each to generate another multi-value token with the lined-up values. Then use that one in the PDF activity.

0 0
replied on April 1, 2016

I am sorry to report that it didn't work, in any way I tried it.

 

I am using For Each Row, and then creating a new token that combines the two fields with allowing multiple values.  Fill out pdf has index applied that separates by line break. The output is that it gives me the first line only.

0 0
replied on April 11, 2016

Miruna, do you have any other suggestions for this issue?

0 0
replied on April 11, 2016 Show version history

Can you post a screenshot of the current workflow?

Edit: did you log the final token? Are you sure it contains all values you want?

0 0
replied on April 12, 2016

0 0
replied on April 14, 2016

Your assign token values has to reference the "For each row" variables, not the original "RetrieveFormContent" variables.

1 0
replied on April 20, 2016 Show version history

@Miruna - yes I logged the tokens at the begining and it is selecting all correctly. The log tokens after the For Each Row activity only has one token, even though the create token is set to have multiple values. What am I doing wrong?

 

@Brandon - unfortunately even with For Each Row variables it only selects the last row in the table :(

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

Sign in to reply to this post.