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
8 replies
Subscribers
8 subscribers
Views
3860 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
In text field we need to restrict field input using masking , i.e field should
ajinkyab
over 11 years ago
In text field we need to restrict field input using masking , i.e field should accept only number and "," e.g 101,202
Please suggest ...
OriginalPostID-60937
OriginalPostID-60937
Discussion posts and replies are publicly visible
0
shivakanthr
over 11 years ago
i think we can not use number in text field for masking. supposeif we enter mask as "111,", in the form we have to provide 111,. other wise it returns invalid input.
So its better to go scripting
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
revat.anandsongkit
Appian Employee
over 11 years ago
Have a look at
forum.appian.com/.../Text_Field_Input
under "Field Masking Rules". Note that this is not available if your form is mobile enabled.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shivakanthr
over 11 years ago
you can use
000,000,000......
here 0 takes 0-9
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ajinkyab
over 11 years ago
Length of the number is not fixed, so i have used following regex in validation javascript
return (window.FormAPI.getValue("myTextField").id).match(/^[0-9]+(,[0-9]+)*$/)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
larson.thune
Appian Employee
over 11 years ago
As an alternative to masking or JS, you can chain into a script task and use logic in that script task to validate the user's entry. From there chain into an XOR gateway. If the user's input is valid, move on to the next form / task. If the user's input is invalid, chain back to the original form with a validation message near the field, instructing the user that his entry failed validation.
This approach allows you to take advantage of the full value of the platform (mobile), as Rikhi alluded to above.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shivakanthr
over 11 years ago
@ajinkyab, its working
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shivakanthr
over 11 years ago
@ajinkyab,can you clarify onething what is use of ^ and $
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ajinkyab
over 11 years ago
^ symbol is use for checking start of the pattern e.g in my case string must start with number bet 0-9 so i have used ^[0-9]
$ symbol used to check end of the pattern. e.g in my case it is 0 or more occurrence of comma followed by number so i have used (,[0-9])*$ .
Link for reference :
www.regular-expressions.info/reference.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel