on 04-13-2012 3:52 PM
Hi All,
I have been looking at hard coding an approval limit into some Project workflow prescript but I am having issues using compareTo with my limit.
I have been trying to use the below code:
import java.math.*;
// Get estimated value price
estvalueprice = doc.getEstimatedValue().getPrice();
// Set approval limit
limit = 200000;
// compare estimated value price against the approval limit
if (hasValue(estvalueprice) @and
estvalueprice.compareTo(limit) < 0)
{
// add approver
}
Using this code I am getting an error when importing the XPDL file which is showing in the log as “Error parsing script”. Do I need to convert the limit before using it in a compare?
Many thanks
Dan
Hi Dan,
limit should be a BigDecimal. Try this...
BigDecimal limit = new BigDecimal(200000.00);
Regards,
Vikram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.