Some months ago I got some assistance by Jono (thank you) where data from one cell in one table could be repeated in another table on my form - ie. all other cells were indepedant apart from a single cell.
The caveat was that the first table could grow by clicking an add button - ie. it started with only one row but could have more and the table cell that was being repeated needed to retain it's individual content.
So, here was the code I used:
form1.Review.reviewsub.reviewtable._planrow.count = form1.plan.plansub.plantable._planrow.count;
var vCol1 = this.resolveNodes("form1.plan.plansub.plantable.planrow[*].wb");
var vCol2 = this.resolveNodes("form1.Review.reviewsub.reviewtable.planrow[*].wb");
for (var i = 0; i < vCol1.length; i ++) {
vCol2.item(i).rawValue = vCol1.item(i).rawValue;
}
this is placed in the onsave event of the table where the data is being pulled to and the cell that it brings data into is called wb
it works a treat.
However, and I'm being really dumb here, I have now been asked to pull in data from another table cell within the same originating table called 'better'. Problem is that if I simply repeat lines 2 and 3 of the above code it only pulls in data from the 'better' cell and not the 'wb' cell anymore.
So it's a syntax question - how do I get lines 2 and 3 of the code to work for BOTH 'wb' and 'better' - I've tried
var vCol1 = this.resolveNodes("form1.plan.plansub.plantable.planrow[*].wb","form1.plan.plansub.plantable.planrow[*].better");
i've tried
var vCol1 = this.resolveNodes("form1.plan.plansub.plantable.planrow[*].wb"),("form1.plan.plansub.plantable.planrow[*].better");
and a few others - as you can tell, my javascripting is a bit shaky.
Anyone help?