Infotable access with indexing both rows and columns
I'm looking for solution, where I can access value of property by 2 indexes: i for rows, j for columns.
Something like myValue = myInfotable.rows[i].columns[j]
Also could use solution like
columnName = myInfotable.fields[j].name;
myValue = myInfotable.rows[i][ColumnName];
Generally, I have bulk load of data, some auxiliary infotable and destination datatable.
I have a loop where I read rows of destination table, call service to read data acc. to row from destination table. Inside loop to read received data record after record, and inside this - loop to check if datas coresspond with rows of aux table, If data fits - increase value in destination infotable, in actual row of it - but column number of destination table depends on row of auxiliary table.
Something like: (columnA, columnB, columnC are just direct name of column)
for (i == 0; i<dest.getRowsCount();i++) {
{data = myService (dest.rows[i].columnC);
for (j == 0; j<data.getRowsCount();j++) {
for (k==0; k< aux.getRowsCount();k++) {
if (data.rows[j].columnA==aux.rows[k].columnB) {
dest.rows[i].column[k] = dest.rows[i].column[k]+1;
}
}
}
}
Of course, I could do it with if's like, but I don't like such amounts of ifs.
for (i == 0; i<dest.getRowsCount();i++) {
{data = myService (dest.rows[i].columnC);
for (j == 0; j<data.getRowsCount();j++) {
if (data.rows[j] == aux.rows[0].columnA) {dest.rows[i].columnD++};
if (data.rows[j] == aux.rows[1].columnA) {dest.rows[i].columnE++};
if (data.rows[j] == aux.rows[2].columnA) {dest.rows[i].columnF++}
if (data.rows[j] == aux.rows[3].columnA) {dest.rows[i].columnG++};
...

