Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to define a business rule to check if my input is a numeric value or not.
Here's my input:
I've applied the next rule in a tMap but unfortunetely it doesn't work (the output gives me zeros):
StringHandling.LEN(out5.Volumen_DM3) > 0 &&
out5.Volumen_DM3.matches("^[0-9]+$")? 1:0
In my tMap input this field is defined as a string and the output is an integer since I've established 1 for correct and 0 incorrect.
Could anyone help me with this rule?
Thank you!!
Marc
This one works:
StringHandling.LEN(row1.volume) > 0 && row1.volume.matches("^[0-9,]+$") ? 1 : 0
Just add a comma into the brackets.
Hello,
It works but I have still problems when the input value has a ".", for example: 1.503,67
Do you know what I would have to add in order to solve the problem?
Thank you!!
It works! Thank you!!