Hi All,
I need to show one validation that - throw error if they enter anything apart from 0 to 9 and .
How can we achieve that using some functions in appian
Can Someone suggest for this?
Discussion posts and replies are publicly visible
It really kinda depends on what valid input(s) you're trying to accept. If you're after only decimal values, you could wrap your save in "todecimal()" at save time, forcing any extraneous characters to go away. If something like "10.2.3.6.8.9" would be acceptable though, you'd need to check the text manually - a regex would work, but also you could just use built-in functions like "cleanWith()" i.e.validations: { if(ri!text <> cleanWith(ri!text, "0123456789."), "Invalid Characters Entered", null())}
Hi,
Thanks, this looks good and I have one more concern what if user provides 8..9.7 smtg like this(2 dot decimals) ?
sid said:what if user provides 8..9.7
all you said originally was "0 and 9 and ." That doesn't exclude having 2 periods in a row. If two periods in a row is not allowed, obviously your algorithm for validation will need to be a bit more complex.