0
在Pentaho程序中,使用修改的javascript步驟。使用product.csv文件,在unitPrice字段中,某個整數具有正數,其他則爲負數。在JavaScript中,我該如何輸入?Pentaho/Javascript:如何將字段值(unitPrice)從負整數更改爲正整數?
這裏我輸入的例子到目前爲止仍然是一個錯誤。
if(unitPrice.getInteger() < 0)
{
unitPrice.setValue(var) = Math.abs(unitPrice.getInteger());
}
約 'Pentaho的',不知道,但我的猜測是'unitPrice.setValue(Math.abs(unitPrice.getInteger()))' – georg 2012-01-30 00:05:10