Koonce Posted Sunday at 11:08 PM Posted Sunday at 11:08 PM (edited) I am trying to setup a calculation to select a number or letter from a field. Like Social Security number. I have that field and put in the social security. But for a form i want each number to go in a field so i can use on a form. If i use left(ssnumber, 1) i am good it is the rest that is tricky. is there any help out there and thanks in advance, I tried the middle function but that i did that wrong. Edited Sunday at 11:10 PM by Koonce
comment Posted Monday at 12:00 AM Posted Monday at 12:00 AM (edited) 52 minutes ago, Koonce said: I tried the middle function but that i did that wrong. The Middle() function is the right approach here: Middle ( SSN ; 4 ; 1 ) will return the 4th character in the SSN field. 52 minutes ago, Koonce said: i want each number to go in a field Instead of defining a separate field for each character you can use a single repeating calculation field = Middle ( Extend ( SSN ) ; Get ( CalculationRepetitionNumber ) ; 1 ) Edited Monday at 12:01 AM by comment
Koonce Posted Monday at 12:24 AM Author Posted Monday at 12:24 AM that worked perfectly and if there is no number it will give a 1 just asking the reason i used a field is the form i was putting it on had different spacing
comment Posted Monday at 12:29 AM Posted Monday at 12:29 AM 2 minutes ago, Koonce said: if there is no number it will give a 1 just asking Sorry, I am not sure what you're saying here. If there is no character at the specified position the result will be an empty string.
Koonce Posted Monday at 12:46 AM Author Posted Monday at 12:46 AM in the calc Middle( SSnumber ; 1 ; 1) i assumed the first number was the position the second number was returning a 1 if there was nothing in the position spot.
comment Posted Monday at 12:48 AM Posted Monday at 12:48 AM (edited) No, the last parameter is the number of characters to return: https://help.claris.com/en/pro-help/content/middle.html Edited Monday at 12:49 AM by comment
comment Posted Monday at 12:54 AM Posted Monday at 12:54 AM No problem. BTW, any discussion concerning storing SSNs should mention this warning: https://www.ssa.gov/phila/ProtectingSSNs.htm
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now