These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Struggling with multiple rows in a table & referencing 1 field.

zbrd
Registered: Nov 17 2008
Posts: 11
Answered

Acrobat LiveCycle 8, WindowsXP.
 
I have a straight forward table with a delete button and a few fields on each row. I can easily add and delete rows from the table, but I am really struggling to get at a single field within the table.
Specifically I am trying to set the delete button and the fields of each row to ReadOnly.
I have no problem referencing the 1st row, but I sure can't figure out how to get at the other rows.
I can reference the first row of the table (in an "i" loop) with:
form1.Page1.details.nodes.item(i).txtSecurityNum.access = "readOnly";
 
After that I'm toast, anyone help me get at the subrows of the table ?
 
Using JavaScript in a LiveCycle form.
 
Thanks in advance.

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

to reference a row you need the instance number of the specific row.

Here an explaination. The instance number is in the [] ans starts with 0, witch means the first instance:

  1. Form
  2. Page
  3. Table1
  4. Row[0]
  5. Cell1
  6. Cell2
  7. Cell3
  8. Row[1]
  9. Cell1
  10. Cell2
  11. Cell3
  12. Row[2]
  13. Cell1
  14. Cell2
  15. Cell3

To get access to the specific row you can use a for loop

  1. for (var i=0; i < Table1.Row.instanceManager.count -1; i++)
  2. {
  3. Form.Page.Table1.Row[i].Cell2.access = "readOnly";
  4. }

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs