on 06-03-2013 6:26 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.