Hi,
I am trying to strip out characters that are non-numerical from an input field. For that I am trying to create a rule that I want to use in a textfield in the interface. Does anyone know how to do it?
Here is what I have that is not working so far. I created a rule named IA_RULE_removeAlphaAndSpecialCharacters which takes one input called alphaText.
cleanwith( ri!alphaText, "0123456789" )
First of the rule is not working so I am assuming it might not be the proper way to do it.
Any guidance would be appreciated.
Thanks,
Roberta
Discussion posts and replies are publicly visible
Usually when I have to do something like this, unless the requirements are somewhat more involved, I simply pass the value through toInteger().
Thank you, Mike. How do you make sure the text does not contain special characters, alpha characters?
tointeger() returns only numeric data.
It didn't work for me. :-|
Actually, i take that back! It worked. Thank you!
Cool, glad to help :)
I tried this, but in result i am getting -ve sign. I just need positive number