Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

add columns into a table

Avatar

Level 2

Hi all,
I have a form what I can add columns up to 6.
I have created dynamic columns into table. When I click add columns until it reach 2, it is automatically add a new table and number location wil be added 2. But it is does not work.

I have spent 3 days to work on it but it is not working.
Pleas help.

Here is my code:

form1.screen17.table3b.BehaviousButtons.addColumn::click - (JavaScript, client)
var nCount = form1.screen17.table3b.Table3.HeaderRow._SCOL2.count;

if(nCount>0 && nCount<3){
form1.screen17.table3b.Table3.HeaderRow._SCOL2.addInstance(1);
form1.screen17.table3b.Table3.Row1._SCOL2.addInstance(1);
form1.screen17.table3b.Table3.Row2._SCOL2.addInstance(1);
form1.screen17.table3b.Table3.Row3._SCOL2.addInstance(1);
form1.screen17.table3b.Table3.Row4._SCOL2.addInstance(1);
form1.screen17.table3b.Table3.Row5._SCOL2.addInstance(1);
form1.screen17.table3b.Table3.Row6._SCOL2.addInstance(1);
form1.screen17.table3b.Table3.Row7._SCOL2.addInstance(1);
form1.screen17.table3b.Table3.Row8._SCOL2.addInstance(1);

}
else if(nCount>=3){
form1.screen17.table3b._Table3.addInstance(1);

}

1 Accepted Solution

Avatar

Correct answer by
Level 10
1 Reply

Avatar

Correct answer by
Level 10