Hi, my form structure is:

I have a table (MonitorProductList) that has repeatable rows. Each row has Product Name in Column A, Description in Column B and Price in Column C.
I want to be able to take all of items in Column A and populate a dropdown on another repeatable subform on Page 2. The selection from this dropdown would then populate a Description and Price fields on Page 2 depending on row selection from the table. Can this be done with the code below? I tried it but the dropdown just shows 2 blank options.
// Get the values from the data model.
var monName = xfa.resolveNodes("ProductData.MonitorProductList.Row1[*].MProduct");
var monDesc = xfa.resolveNodes("ProductData.MonitorProductList.Row1[*].MDesc");
var monPrice = xfa.resolveNodes("ProductData.MonitorProductList.Row1[*].BPrice");
var mDD = new Array(" ",monName);
var mDis = new Array(null,monDesc);
var mPri = new Array (null,monPrice);
// Populate the part number Drop-down List.
function populatePartNo(dropdownField)
{
var i;
for (i=0; i < mDD.length; i++)
dropdownField.addItem(mDD[i]);
}
// Populate the description and unit price fields.
function getDesc(partNumber, descField, itemPrice)
{
var i;
for (i = 0; i < mDD.length; i++) // Go through the entire list of part numbers to find the one that is currently selected.
{
if (mDD[i] == partNumber) // When we find the part number currently selected.
{
descField.rawValue = mDis[i]; // Put the description in the description field
itemPrice.rawValue = mPri[i]; // and put the unit price in the unit price field.
break; // No need to go further if there is a match.
}
}
}
Thank you