Jump to content

data entry form


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

Recommended Posts

i think your question is not so clear, but maybe i just dont understand it clear.

i think you mean to ask if you can define a field which formats the users input, or checks if the users input was in a specific format.

yes you can, for example make a new field called phonenumber. define it as a auto-enter calculation field (always replace) and enter this calculation there

Let (

[phonenumber=Filter ( phonenumber; "0123456789") ];

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

)

Above will a.) strip away extra characters in th phonenumber field, and b.) will format it like this 123-456-789 . from here you can add more checks to this calculation, such as the number may not be longer then 10 digits etc etc.

Link to comment
Share on other sites

I think what you are asking about is an Input Mask or Field Formating, not sure of the exact name. Where the user would be prestented with an input field that looks like - (###)###-#### and the cursor jumps to the next number symbol as the user enters data and stops when the user has entered something for the last # symbol.

There is no such feature in FileMaker. You can do something like overrider suggested but I might revise the code to something like:

Let (

[phonenumber=Filter ( phonenumber; "0123456789") ];

Left(phonenumber; 3) & "-" & Middle(phonenumber; 4; 3) & "-" & Middle(phonenumber; 7 ; Length(phonenumber - 6)

)

This way if a user happens to enter an extra digit the calculation doesn't try to be smart and ends up losing information. Also some users may enter an extension - 123-456-7890 x1234 which would result in 123-456-1234 using the code overrider suggested.

While you may notice you can limit the number of characters in a field using the Validation tab for the field, you will quickly notice it is anoying rather than helpful. (Note a validation error would occur if a user entered 999-999-9999 and the limit was set to 10). The character limit does not actually stop the user from entering more than X characters but rather waits until the user is done typing then when they try to leave the field an error occurs. IMO, the way Access allows control over the user entry is far superior.

Link to comment
Share on other sites

This topic is 5733 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
 Share

×
×
  • Create New...

Important Information

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