Jump to content
Server Maintenance This Week. ×

ss# and Phone#


teckert

This topic is 7120 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I put 2 fields on top of each other...

top field with opaque background, not selectable in browse mode to display

the result (say a text field with a calculation that formats the phone number

like you want wtih the "(" etc.).

an the bottom field (a number only field) to take the user input in browse mode.

Base on what the user enters your calculated top field will convert and display

in the desired color & format all based on your calculation.

Good luck

--Dan

Link to comment
Share on other sites

With 7 you can now have an auto enter calcualted field that will update after the first instance of entering. This enables you to reformat a field to whatever you wish it to contain.

This is great for phone number and social security formatting amongst other things.

Simply create a text field for your phone number and then apply an auto enter calculation, something along the lines of:




    /* The Let () function allows us to create a variable for use within a calculation */



Let (

 [  PhoneNumber=Filter ( Current Field Name Here; "0123456789") ];

      /* The filter removes all extra characters, leaving just the numbers */ 



      /* Reformat the number now, adding in the extra characters */



   Left(PhoneNumber; 3) & "-" & Middle(PhoneNumber; 4; 3) & "-" & Right(PhoneNumber; 4)

      )



After you click ok, uncheck the box underneath the auto enter calc value so that the field will update itself when the contents are changed.

This now saves on any extra "display" fields and the user does not get confused when they click in the field and the format changes. They can enter the phone number how ever they want, but it will update to your format when they leave the field. If they click back in the field, what they see is what they get.

Link to comment
Share on other sites

This topic is 7120 days old. Please don't post here. Open a new topic instead.

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.