Skip to Content
Jan 10, 2020 at 04:05 PM

CPI Handling Null Values With Multiplication Mapping Function

691 Views Last edit Jan 10, 2020 at 04:06 PM 2 rev

I have a requirement to multiply one value by 0.9 in message mapping, however the value (from hash map) to be multiplied is not always present. If the value to be multiplied is null, then a mapping error "cannot cast "" to decimal value occurs". I've found that replacing the null value with a 0 solves the problem, but I again have to replace the 0 with spaces after the multiplication step since the field should not contain a 0 value. It seems that true/false values of if statements are evaluated regardless of the condition, and so I've not been able to use this method.

I believe maybe there is a better way to handle this, but I have not found it. I welcome any suggestions. I am basically looking for a straightforward way to do "y" action if "x" value is not null Thanks.