Jump to content

Recommended Posts

Posted (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 by Koonce
Posted (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 by comment
Posted

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

 

Posted
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.

 

Posted

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.

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.