Retrieving the Redlined Bom table

Hi,
I need to do few checks on the redlined bom table in a Change, how can I retrieve its rows?
Don’t know if I’ve been clear, the table I need is this one:

Retrieving the Redlined Bom table

Many thanks!!
Roberto

Add Comment
2 Answer(s)
Best answer

Hi Roberto,

Do you mean with SDK?

It canb e done as below

IChange object = …
ITable tableAI =object.getTable(ChangeConstants.TABLE_AFFECTEDITEMS);
Iterator<IRow> iteratorAI = tableAI.iterator();

while (iteratorAI.hasNext()) {
IRow row = iteratorAI.next();
Object number = row.getCell(ChangeConstants.ATT_AFFECTED_ITEMS_ITEM_NUMBER);

String number = number;
String description = row.getCell(ChangeConstants.ATT_AFFECTED_ITEMS_ITEM_DESCRIPTION);

boolean isRedlined = row.isFlagSet(ChangeConstants.FLAG_AI_ROW_HAS_REDLINE_BOM);

if (isRedlined) {
IItem item = (IItem) row.getReferent();
Iterator redBom = item.getTable(ItemConstants.TABLE_REDLINEBOM).iterator();
while (redBom.hasNext()) {
IRow rBomRow = (IRow) redBom.next();
ICell cell = rBomRow.getCell(ItemConstants.ATT_BOM_ITEM_NUMBER);
boolean isDeleted = rBomRow.isFlagSet(ItemConstants.FLAG_IS_REDLINE_REMOVED);
boolean isAdded = rBomRow.isFlagSet(ItemConstants.FLAG_IS_REDLINE_ADDED);
String bomNumber = cell.toString();
for (ICell iCell : rBomRow.getCells()) {
IAttribute attribute = iCell.getAttribute();
String attributeLabel = attribute.getName();
String oldValue = iCell.getOldValue();
String newValue = iCell.getValue();
//do something with extracted info
}
}
}
}

May this can help you to udnerstand how but if you have a particular case let me know

Agile Angel Answered on April 26, 2016.
Add Comment

Hi Antonio,
thank you very much!!
I was not retrieving the correct table. 🙂

Thanks again!!
Roberto

Agile User Answered on April 27, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.