Hi, we have a problem with adding rows to a table in script.
We need to add couple of rows via the script.
We use init event of the table
This code is not working
for (var i = 1; i < aantalDossiers.length ; i++) {
mod_gegevens.main.subform_vaststellingen.subform_gecontroleerdeDossiers.Table2._Row1.addInstance(true);
}
The problem is the loop because if i do this:
mod_gegevens.main.subform_vaststellingen.subform_gecontroleerdeDossiers.Table2._Row1.addInstance(true);
mod_gegevens.main.subform_vaststellingen.subform_gecontroleerdeDossiers.Table2._Row1.addInstance(true);
mod_gegevens.main.subform_vaststellingen.subform_gecontroleerdeDossiers.Table2._Row1.addInstance(true);
mod_gegevens.main.subform_vaststellingen.subform_gecontroleerdeDossiers.Table2._Row1.addInstance(true);
it works.
By the way, i'm getting this error:
Unable to add instance of 'Row1': recursive or cyclic situation detected.
Any idee how can we do this in een loop ?
regards
Solved! Go to Solution.
Views
Replies
Total Likes
so my solution was to put the script into Table2.Row1 init event
and to use ResolveNodes function
var aantalDossiers = mod_vbm_gegevens.main.subform_vaststellingen.subform_dossiers.all;
var rows = mod_vbm_gegevens.main.subform_vaststellingen.subform_gecontroleerdeDossiers.Table2.resolveNodes("Row1[*]");
in the loop i could then put in each new row the data.
var row = rows.item(i);
row.Cell2.rawValue = "some text";
Views
Replies
Total Likes
Views
Replies
Total Likes
so my solution was to put the script into Table2.Row1 init event
and to use ResolveNodes function
var aantalDossiers = mod_vbm_gegevens.main.subform_vaststellingen.subform_dossiers.all;
var rows = mod_vbm_gegevens.main.subform_vaststellingen.subform_gecontroleerdeDossiers.Table2.resolveNodes("Row1[*]");
in the loop i could then put in each new row the data.
var row = rows.item(i);
row.Cell2.rawValue = "some text";
Views
Likes
Replies
Views
Likes
Replies