cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Dynamic Tables

0 Kudos

Hi experts,

I have a table in my offline Adobe Form, which I am populating dynamically by pushing a button to add rows. I need to get the values of the first column in order to populate a dropdown list automatically.

I am struggling to get the right way to read this table, I just can't index it. Can you please help me?

Thanks and regards,

Gonçalo Costa

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Gonçalo Costa,

Can you show us your coding to read the value?

Basically, you need to do looping and to read each row value, sample coding.

form1.Page1.Subform1.btnReadTable::click - (JavaScript, client)

var rowCount = MyTable._Row1.count;

var i = 0;

for(i=0 ; i<rowCount ; i++)

{

app.alert(xfa.resolveNode("MyTable.Row1[" + i  + "].txtName").rawValue);

}


http://forums.adobe.com/thread/765813

MyTable = your table name

Row1 = your body row name.

Hope this helps

regards,

Xiang Li

0 Kudos

Hi xiangli,

Thanks for your help. The 'xfa.resolveNode' method didn't work for me, I had already tried it. After going through the Adobe forum, I have found a way to achieve what I needed. To access the table items I did the following:

var allitems = table.row.all;

Then I was able to read the table as I need using a loop, similiar to the one you proposed:

for (i=0; i<allitems.length; i++)

{

var data = allitems.item(i).column1.rawValue;

}

Thank you.

Kind regards,

Gonçalo

Former Member
0 Kudos

Hi Gonçalo,

Glad to hear you solve your issue yourself.

regards,

Xiang Li