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

How do I concatenate values from a dynamic table's rows?

Biffnet7
Registered: Dec 9 2009
Posts: 36
Answered

Hello
 
I have a form with dynamic table rows and I want to add the content of two cells from each dynamically-generated row, and have results from all the existing rows show up in a text field.
 
Any help with this would be appreciated.
 
Thanks
 
Allen

Allen

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Accepted Answer
Hi,

this can be done with a loop like this.

  1. var nRows = Table._Row.count;
  2. var aValues = "";
  3.  
  4. for (i = 0; i < nRows; i++)
  5. {
  6. aValues = aValues + xfa.resolveNode("Table.Row[" +i+ "].Cell1").rawValue + " " + xfa.resolveNode("Table.Row[" +i+ "].Cell2").rawValue + "\u000A";
  7. }
  8.  
  9. this.rawValue = aValues;

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

Biffnet7
Registered: Dec 9 2009
Posts: 36
This is fantastic. Thanks.

Allen

Allen