Redline BOM values

Hi All,

I am trying to retrieve the redline BOM values from Affected Items tab for an ECO.

I am using isRedlineModified() function to identify redline BOM values and able to print the values.

But, the problem is, when I use this function it skips the new line values and it displays only the existing modified values.

For example,

I have an affected item BOM 844-00XX08-00 which contains 905 find numbers. In these, find no 27 is changed is from the previous version. find no 905 is newly added in current change. isRedlineModified() function displays only find no 27 not 905?

Any idea how to fix this?

 

Code:

 

//Get the Redline BOM Table
ITable redlineBOM = bomItem.getTable(ItemConstants.TABLE_REDLINEBOM);

IRow disRow;
Iterator it = redlineBOM.iterator();
while (it.hasNext()) {
disRow = (IRow) it.next();

if(((IRedlined)disRow).isRedlineModified())
{
findNo = (String)disRow.getValue(ItemConstants.ATT_BOM_FIND_NUM).toString();
itemNumber = (String)disRow.getValue(ItemConstants.ATT_BOM_ITEM_NUMBER);
itemRev = (String)disRow.getValue(ItemConstants.ATT_BOM_ITEM_REV).toString();
itemDesc = (String)disRow.getValue(ItemConstants.ATT_BOM_ITEM_DESCRIPTION);
itemQty = (String)disRow.getValue(ItemConstants.ATT_BOM_QTY).toString();
itemLifeCycle = (String)disRow.getValue(ItemConstants.ATT_BOM_ITEM_LIFECYCLE_PHASE).toString();
bomNotes = (String)disRow.getValue(ItemConstants.ATT_BOM_BOM_NOTES).toString();
refDes = (String)disRow.getValue(ItemConstants.ATT_BOM_REF_DES).toString();
//System.out.println(itemNumber);
//System.out.println(itemDesc);

redValue = findNo + “;” + itemNumber + “;” + itemRev + “;” + itemDesc + “;” + itemQty + “;” + itemLifeCycle + “;” + bomNotes + “;” + refDes;
// Fourth Element
Element redValues = document.createElement(“RedLineValues”);
redValues.appendChild(document.createTextNode(redValue));
affItems.appendChild(redValues);

}
}

Add Comment
1 Answer(s)

Hello

Interesting why IRedlined supports only modified

Can you try this?

disRow.isFlagSet(ItemConstants.FLAG_IS_REDLINE_ADDED))

You also have REDLINE_REMOVED and REDLINE_MODIFIED

Hope this helps

-Raj

 

Agile Angel Answered on June 19, 2019.

Hi Raj,

 

Sorry for the late reply. Actually, I fixed this using the same solution.

I used the condition like following

if (disRow.isFlagSet(ItemConstants.FLAG_IS_REDLINE_ADDED)
|| ((IRedlined) disRow).isRedlineModified())

Now it is dispaying both added and modifed redline components.

 

on June 25, 2019.
Add Comment

Your Answer

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