Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to create Rows dynamically from Code without binding

Avatar

Avatar
Validate 1
Level 1
dhruvinm
Level 1

Like

1 like

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
dhruvinm
Level 1

Like

1 like

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
dhruvinm
Level 1

19-04-2021

Dear All,

I have few fields in my Form which comes as below.

field a = test1|test2|test3

now i have splitted that with " | " but i when i try to add that in table only first line shows up.

 

 

Code :

var prBatchTable = prBatch.formattedValue.split("|");

if (prBatchTable[0] != "") {
for (i = 0; i < prBatchTable.length; i++) {
curRow = this.resolveNode("Row1[" + i + "]");
curRow.Cell3.rawValue = parsednew;
}
}

 

/// Also tried manully doing the loop

curRow = this.resolveNode("Row1[" + 0 + "]");
curRow.Cell3.rawValue = "11";

 

curRow1 = this.resolveNode("Row1[" + 1 + "]");

curRow1.Cell3.rawValue = "22";

 

How can i create multiple instance of Row1?

 

Dynamic table.PNG

View Entire Topic

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

19-04-2021

Hi,

 

you need to set the number of instances of the row depending on your input.

 

var aBatchTable = prBatch.formattedValue.split("|"),
    oRows;
// Set instances of rows
Table1._Row1.setInstances(aBatchTable.length);
// Resolve all rows into a node list
oRows = Table1.resolveNodes('Row1[*]');
// update value in every row
aBatchTable.forEach(function (element, index) {
    oRows.item(index).Cell3.rawValue = element;
});