Jump to content
We've recently updated our Privacy Statement, available here ×

How to multiply field values by a number


colinmrice

Recommended Posts

Code:
Hi,
I have an ETL job that uses the tMap control to map a BigDecimal input field to a BigDecimal output field. The result in the output field should be Raw.TranAmount * 0.07, as seen below:

Raw.TransactionType == 1 && Raw.AgentNo > 100000 ? Raw.TranAmount * 0.07 : 0

However I get java compilation errors saying that 'The operator * is undefined for the argument type(s) BigDecimal, double'. If I try the following:

Raw.TransactionType == 1 && Raw.AgentNo > 100000 ? 10 * 0.07 : 0

that works fine, so I know it is just having a problem multiplying the value from field Raw.TranAmount with 0.07.

I've tried various java/groovy functions like .multiply but still no good. Surely someone must have needed to do this before. Any suggestions?

Thanks
Colin
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...