string AML = "" +
"<Item type='MasterList' action='merge' id='{SOURCE_ID}'>" +
" <Relationships>";
for (I=0; I<SQLResult.getItemCount(); I++) {
AML += " <Item type='MasterList_Part' action='add'><related_id>";
//If you know the ID of the "related_id" (child) item use following row:
AML += "{ID or the child item}";
// - OR -
//If you know the KEYED_NAME of the "related_id" (child) item use following row:
AML += "<Item action='get'><keyed_name>{KEYED_NAME OF THE CHILD ITEM}</keyed_name></Item>";
AML += "</related_id></Item>";
}
if (!string.IsNullOrEmpty(AML))
Item qryResult = this.getInnovator().applyAML("<AML>" + AML + "</AML>");
To optimize even more:
string AML = "" +
"<Item type='MasterList' action='merge' id='{SOURCE_ID}'>" +
" <Relationships>";
for (I=0; I<SQLResult.getItemCount(); I++) {
AML += " <Item type='MasterList_Part' action='add'><related_id>";
//If you know the ID of the "related_id" (child) item use following row:
AML += "{ID or the child item}";
// - OR -
//If you know the KEYED_NAME of the "related_id" (child) item use following row:
AML += "<Item action='get'><keyed_name>{KEYED_NAME OF THE CHILD ITEM}</keyed_name></Item>";
AML += "</related_id></Item>";
}
if (!string.IsNullOrEmpty(AML))
Item qryResult = this.getInnovator().applyAML("<AML>" + AML + "</AML>");
To optimize even more:
Copyright © 2025 Aras. All rights reserved.