I have two table rows (row 2 and 3) combined as a section. When I use the following script, LiveCycle only creates a new instance of row 3 instead of creating a new instance of the section (both rows 2 and 3). What am i doing wrong? (The section is named 'ActionItem1 in Table1)
this.resolveNode('Table1._ActionItem1').addInstance(1);
if (xfa.host.version < 8) {
xfa.form.recalculate(1);
}
Solved! Go to Solution.
Views
Replies
Total Likes
You should be able to recreate what you're doing with subforms, tables are just specialized subforms. Create subforms for your headers, rows, etc. I've built a few tables that way.
Views
Replies
Total Likes
Hi,
You would need another addInstance() method call for the other row, but in that case the rows will not be next to each other. You will get all the ActionItem1 rows together and then whatrever you called the other row. You may be better off using a repeating subform which will give you more control of the layout of the "table".
Regards
Bruce
Views
Replies
Total Likes
Bruce,
Thanks for your reply. To keep the rows together you mentioned a repeating subform. Do you mean to place a separate table in a repeating subform? As far as i knowm I can't wrap the two rows of a table into a subform, right?
Thanks again!
~Don
Views
Replies
Total Likes
Hi Don,
I was thinking it might be easier to replace the table totally with a repeating subform. Seems to give you more control, but you don't get things like repeating headers on subsequent pages.
But that might not suit your case. Does row2 and row3 have "Repeat row for each data item" set, in which case does row2 have a min count, if it is zero then it probably wont be rendered.
Bruce
You don't get repeating headers per se but you can use an Overflow Leader or Trailer for subforms.
I'm surprised that I can't lock two (or more) table rows together and script a new instance of that group. Unfortunately, the subform idea won't suit what i am trying to do.
Thanks for the responses. I really appreciate it.
Views
Replies
Total Likes
You should be able to recreate what you're doing with subforms, tables are just specialized subforms. Create subforms for your headers, rows, etc. I've built a few tables that way.
Views
Replies
Total Likes
Okay Jono,
I will give it another try and report back later.
Thanks again.
~Don
Views
Replies
Total Likes
Yes - that will work after all by using overflow leaders and trailers.
Thanks!
~Don
Views
Replies
Total Likes