• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 285
  • Last Modified:

Limiting Fields for phone Numbers

Hello,

Im am attempting to make a easy Phone number data entry where my client could use that to search from.. I want to have 2 number fields..
Field1 is limited to 3 numbers (first 3 numbers of a phone number) and
field2 is limited to 4 numbers (last 4 number of a phone number).
Now i dont have a problem glueing these numbers together to make one number to use in the search.. However i can not for the life of me figure out how to either limite field1 or creat an auto tab after 3 numbers are entered.

Thank you
Criss
0
criss_mce
Asked:
criss_mce
  • 2
  • 2
3 Solutions
 
billmercerCommented:
FileMaker doesn't provide event-based scripting, input masks, or sophisticated user interface controls. Data validation is done by the database engine, not the user interface.

One alternative is to allow the user to enter the number in a single field, then use a script or calculated field to parse the value and format it as you like.

There are some third-party plug-ins that provide some of these functions, but I have found it easier to just allow free-form entry of values, and train the users to enter them properly by yelling at them with annoying dialogs.

FileMaker's approach to databases is more freeform. Part of the reason for this is that FileMaker is cross-platform. If you want to have strict control over the user's actions, you may find Filemaker frustrating. When working in FileMaker, it's usually better to take a minimalist approach.

0
 
lesouefCommented:
bill,
you should specify where is the yelling function in scriptmaker, I'd like to use it.

criss,
I agree with bill. I would let the user to enter 7 digits, then use a plug-in like runscript to modify data upon field validation.
There are more sophisticated plug-ins for auto reformatting, but yr case 3 + 7 can be done in 2s with runscript.
http://costello_ryan.tripod.com/download/RunScript.zip, you'll like it.
What is does is simply to execute a script when you exit a given field (tab or enter (sorry, no -> !)
0
 
drburt1Commented:
Since you may like a step by step approach, here's one that works as you requested:

1. File -> Define Fields.
2. Pick the field you want to be exactly three digits long.
3. Click the Options button.
4. Put a check mark next to "Validated by calculation"
5. Click "Specify" button
6. Enter this formula, being sure to use your field name instead of mine:

Length(Three digits) = 3

7. Click OK
8. Check "Stinct" if you really want to force the user. I don;t recommend this.
9. Check "Display message" and here's where you can yell at the user "Hey! Enter exactly 3 digits! Not 2! No letters!".
Or you could enter something more gentle.

I may be remiss in not suggesting that what you have asked for is not really in your best interests, but I thought I'd at least give you what you want for starters.

Burt
0
 
billmercerCommented:
Lesouef, you mean you don't have the YELL_AT_USER script step in the French version of FileMaker?

0
 
lesouefCommented:
no, a shame really... fortunately I'll be able to make my own function in fm7, I just wonder how I'll call it and what will be the msg;
what do you think of these:
- please quit the app. you are too stupid to go on using it.
- I said no ****ing letters in this field
- even my donkey would answer this correctly
- I am not sure you comply to the min. level of knowledge to use this smart app.
other ideas? I coul even make the msg random...
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now