Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
+1
person also asked this
people also asked this
Replies
3 replies
Subscribers
7 subscribers
Views
11735 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
We have text fields that we need to validate are numbers. For example, if the v
Mike James
Certified Lead Developer
over 9 years ago
We have text fields that we need to validate are numbers. For example, if the value is "134" or "1456.45" it should pass. but the rule should fail on "TEXT" or "3A5T.57".
Initially, we tried a validation expression like: if(todecimal(ri!textinput)=ri!textinput, true, false) ...however this ran out of usefulness when the text input is greater that 8 characters because Appian starts to round decimals or use scientific notation. So we were failing valid numbers such as "100000.35"
Does anyone have a good way we could perform this validation?
OriginalPostID-142914
OriginalPostID-142914
Discussion posts and replies are publicly visible
Top Replies
abhi.jana
over 9 years ago
+1
Appian Employee
Try - =if(regexmatch("^([0-9.]{1,50})$",ri!input),"Number","Text") Assuming the input is limited to 50 characters. You can further customize the regex pattern to match more specific inputs. The regexmatch…
Parents
0
Josh
Certified Lead Developer
over 9 years ago
My first thought is that you could use code() and then validate each unicode character. A bit of a hassle though.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Josh
Certified Lead Developer
over 9 years ago
My first thought is that you could use code() and then validate each unicode character. A bit of a hassle though.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data