Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Custom Pattern

Avatar

Level 1

I am trying to create a field

(text, password, number, etc) to have the social security number print with this pattern xxx-xx-1234 (to show only the last four of the ssn) and am getting an invalid pattern... what am I doing wrong? Is there a way to create this? Thanks!
2 Replies

Avatar

Level 10

I too struggle with patterns so I do what I know....code. It is completely up to your requirements but one solution could include the use of two SSN fields, one for display and one for data binding. In the attached form I use a regular expression to parse "ssn_" and validate it complies with the format 123456789 or 123-45-6789. If it does I rebuild "ssn_" with the mask and the last 4 digits then assign the value entered to the field "ssn". The field "ssn_" is set to use "No data binding" and "ssn" is set to "Use name (ssn)". In the attached "snn" is visible for demonstration but it would be declared hidden.

Untitled2.png

Steve

Avatar

Level 1

Steve, YOU ARE AWESOME!!! Thank you so much - I can't tell how much that helped!!