0

如何获取多事件属性的值?

我在这里找到了部分解决方案,但不清楚获取 EntryNode。

https://www.ibm.com/support/knowledgecenter/en/SSWSR9_11.6.0/com.ibm.pim.app.doc/code/pimscript/pim_ref_writevalueruleformultiatt.html

4

1 回答 1

0

这是始终返回相同代码的部分:

rawCode=item.getEntryRelationshipAttrib("Product Master Catalog Spec/Raw Materials Details/Code");

那是因为它总是返回第一次出现。我认为您的代码应如下所示:  

pnode = entrynode.getEntryNodeParent(); 
attribCode = pnode.getEntryNode("/Code").getEntryNodeValue();
//This returns the path with the # and the correct order.
attribCodePath = pnode.getEntryNode("/Code").getEntryNodeExactPath();
rawCode=item.getEntryRelationshipAttrib(attribCodePath);
rawmatCode = rawCode[1];
var rawCatalog = getCtgByName("Raw Material Catalog") ;
rawMatItem = rawCatalog.getCtgItemByPrimaryKey(rawmatCode);
rawMatCost = rawMatItem.getEntryAttrib("Raw Material Details Spec/Cost") ;
 
attribQty = pnode.getEntryNode("/Qty").getEntryNodeValue();
res=attribQty*rawMatCost;
于 2019-08-29T16:20:00.030 回答