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
Replies
6 replies
Subscribers
8 subscribers
Views
2275 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hi, my users have to enter a 10 digit barcode number. I want to do some bas
moritzw
over 10 years ago
Hi,
my users have to enter a 10 digit barcode number. I want to do some basic validations on the field:
if(len(tointeger(ri!barcodeNumberValue_txt))<>10,"Error Msg.",""),
if(len(tointeger(ri!barcodeNumberValue_txt))<>len(ri!barcodeNumberValue_txt),"Error Msg.","")
The first one works fine, but the latter one doesn't work for large numbers. Any ideas how could validate that the field only contains digits?
TIA, Moritz
OriginalPostID-139230
OriginalPostID-139230
Discussion posts and replies are publicly visible
Parents
0
best
Certified Lead Developer
over 10 years ago
tointeger("987653214032") will give you infinite, if the number has more than 10 digit.
So, try this:-
if(len(cleanwith(ri!barcodeNumberValue_txt,"0123456789"))<>10,"Error Msg.","")
if(len(cleanwith(ri!barcodeNumberValue_txt,"0123456789"))<>len(ri!barcodeNumberValue_txt),"Error Msg.","")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
best
Certified Lead Developer
over 10 years ago
tointeger("987653214032") will give you infinite, if the number has more than 10 digit.
So, try this:-
if(len(cleanwith(ri!barcodeNumberValue_txt,"0123456789"))<>10,"Error Msg.","")
if(len(cleanwith(ri!barcodeNumberValue_txt,"0123456789"))<>len(ri!barcodeNumberValue_txt),"Error Msg.","")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data