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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adding data to specific lines in a multiple row subform

_Frederik-Jan_R
Level 2
Level 2
Dear,



I've got an Enterprise Service that retrieves Materials, I created a SubForm (that can grow dynamically, it already does this) to list all the items with some detail fields.



Retrieving one item is no problem, the first instance of the subform will be created and the data will be filled in. Using this code :



var nCount = 0;

var nLimit = 10;



for(var nItemCount in oItems)

{

_sf_Row.addInstance(1);

for(var nItemNode in oItems[nItemCount])

{

if (nItemNode == "MATNR")

{

sf_Row.txt_Matnr.rawValue = oItems[nItemCount][nItemNode];

}

if (nItemNode == "MAKTX")

{

sf_Row.txt_Maktx.rawValue = oItems[nItemCount][nItemNode];

}

if (nItemNode == "MATKL")

{

sf_Row.txt_Matkl.rawValue = oItems[nItemCount][nItemNode];

}

if (nItemNode == "MEINS")

{

sf_Row.txt_Meins.rawValue = oItems[nItemCount][nItemNode];

}

if (nItemNode == "MTART")

{

sf_Row.txt_Mtart.rawValue = oItems[nItemCount][nItemNode];

}

}

if ( ++nCount >= nLimit )

break;

}



As you can see here, I just fill up the Subform directly. (the subform is named sf_Row)



I've tried all possible combinations to fill up a specific row in the subform table, but they all give JavaScript errors ...



sf_RownCount.txt ...

sf_Row(nCount).txt ...



And a bunch of others ...



It's a fairly simple question though I've completely ground to a halt in developing this part.



nCount is a counter starting from 0 to a max of 10 rows to be shown (the max in my search for this demo)



Any help would be greatly appreciated!

Cheers,

Frederik-Jan
0 Replies