Forum Discussion
KevinSlider
7 years agoQrew Trainee
You should have 2 fields:
1 for data entry - on form for add and edit.
2 for showing Xs - on form for view.
I assume it is not to match number for digit, so I would simply create a text formula, if(length([ssn])>0,"XXX-XX-XXXX","").
If you do want to match digit for digit you need a different formula, I would use this...
case(length([ssn]),
9,"XXX-XX-XXXX",
8,"XXX-XX-XXX",
7,"XXX-XX-XX",
6,"XXX-XX-X",
5,"XXX-XX",
4,"XXX-X",
3,"XXX",
2,"XX",
1,"X","")
1 for data entry - on form for add and edit.
2 for showing Xs - on form for view.
I assume it is not to match number for digit, so I would simply create a text formula, if(length([ssn])>0,"XXX-XX-XXXX","").
If you do want to match digit for digit you need a different formula, I would use this...
case(length([ssn]),
9,"XXX-XX-XXXX",
8,"XXX-XX-XXX",
7,"XXX-XX-XX",
6,"XXX-XX-X",
5,"XXX-XX",
4,"XXX-X",
3,"XXX",
2,"XX",
1,"X","")