Forum Stats

  • 3,734,273 Users
  • 2,246,935 Discussions
  • 7,857,216 Comments

Discussions

Dynamic action not affecting all rows in a large interacitve grid

I have a dynamic action set on page load to loop through the entire interactive grid, multiply two rows that already exisit in the database and set the values to a new row. The JS code goes something like this:

var widget=apex.region('id').widget();

var grid=widget.interactiveGrid('getViews','grid');

var model=grid.model;

var x=model.getFieldKey("r1");

var y=model.getFieldKey("r2");

model.forEach(function(record){

   var x1=parseFloat(record[x]);

   var y2=parseFloat(record[y]);

   var z = x1*y1;

   model.setValue(record,'r3',z.toFixed(3));

})

The code has been working perfectly on an interactive grid with 10 rows or less. However, the code is not working properly on an interacitve grid that has over 80 rows. The code seems to skip the first 40 rows, working only with the second half.

Please help me identify the problem that I am facing. Any help would be appreiciated.

Sign In or Register to comment.