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

Question

Question

How to get variables of rows in a table

asked on October 13, 2020 Show version history

I have a table in Laserfiche Forms with two columns and three fixed rows. 

The variable assigned seems to be only set for the columns on the first row?  Is there a way to obtain the variables for the two other rows?

 

0 0

Answer

SELECTED ANSWER
replied on October 13, 2020

Anywhere you're using a token you can right-click to get the Token Editor, then tell it which value to use in the Apply Index area.

 

0 0

Replies

replied on October 13, 2020 Show version history

Yes using the variable given for the table in question in place of "Table_Variable" and using nth-child(n) selector for selecting the column. The example below will select the first column inputs. 

Note: we start at 2 because the first column contains the labels. Unless of course you have hidden the labels in which case you can start from 1.

$('li[attr="Table_Variable"] table tr td:nth-child(2) input') // will select first column
$('li[attr="Table_Variable"] table tr td:nth-child(3) input') // will select second column

Hope this helps!

0 0
replied on December 16, 2021

How would I go about filling in a hidden field with the value I select from the 1st or  2nd row?  I have a table with 10 rows I would like to extract a variable for each.

0 0
replied on October 13, 2020

Depending on what you're doing, Workflow can also get at them. Typically you would use a For Each Row to loop through the table but you can also use the variable itself and then, with the Token Editor, tell it which value (row) to use. The one thing is you have to know how many rows the table has to use that second method effectively.

0 0
replied on October 13, 2020

Is the token editor the "Assign Token Values" tool?  I have it set up like this but it isn't working.

0 0
SELECTED ANSWER
replied on October 13, 2020

Anywhere you're using a token you can right-click to get the Token Editor, then tell it which value to use in the Apply Index area.

 

0 0
replied on October 13, 2020

Thanks so much!  It works great.

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

Sign in to reply to this post.