Data Entry Validation 
Author Message
 Data Entry Validation
Hi,

Is it possible to validate the entry of phone numbers such as "555 777
9999" so that there are the spaces in between and all 10 characters are entered?

--
Thanks,
Cesar A. Iriarte
Systems Director

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

 Iris Internet Solutions
  http://www.***.com/


  phone: 361.884.9000
  fax: 361.883.1786
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||



Mon, 03 Nov 2003 23:48:14 GMT
 Data Entry Validation

Quote:
>Hi,

>Is it possible to validate the entry of phone numbers
>such as "555 777 9999" so that there are the spaces
>in between and all 10 characters are entered?

>--
>Thanks,
>Cesar A. Iriarte
>Systems Director

Yes, there is a way.  Assuming the field name is tele, you must enter in a text
field and then the following convoluted formula:

Length(tele) = 12 and (100*TextToNum(Middle(tele, 1, 1)) +
10*TextToNum(Middle(tele, 2, 1)) + TextToNum(Middle(tele, 3, 1)) =
TextToNum(Middle(tele, 1, 3))) and Middle(tele, 4, 1) = " " and
(100*TextToNum(Middle(tele, 5, 1)) + 10*TextToNum(Middle(tele, 6, 1)) +
TextToNum(Middle(tele, 7, 1)) = TextToNum(Middle(tele, 5, 3))) and Middle(tele,
8, 1) = " " and (1000*TextToNum(Middle(tele, 9, 1)) +
100*TextToNum(Middle(tele, 10, 1)) + 10*TextToNum(Middle(tele, 11, 1)) +
TextToNum(Middle(tele, 12, 1)) = TextToNum(Middle(tele, 9, 4)))

You have to do it this way because FileMaker can not distinguish that alpha
numbers can not be numeric when using TextToNum very well, or else the formula
could be drastically shortened.

BTW, I am using FileMaker Pro 5.0 on the Mac, but I don't think that this is
going to matter that much....  :-)

Hope that this helps...

Bill
--------------
The box listed as the requirements:  Windows95 or better
...so I bought a Macintosh.

(Remove nospam from email address)



Tue, 04 Nov 2003 01:58:09 GMT
 Data Entry Validation
I am not a big fan of validation, particularly in a situation such as this
one, because the validation will be triggered only after the field is
exited, meaning the user has just entered their phone number, with one
character off, or forgetting one space, and your complex validation
calculation then comes back and tells them, with one generic message for all
possible errors, that they have to do it over.

There are many solutions to this common problem. My preference is for 10
individual number fields (OK to validate each one as numeric only), laid out
as you like (spaces where you want them, along with a dash and parentheses),
and then either a button that submits the group, using Set Field, to one
text or number field, checking the whole set, if you like, again for numeric
only and not empty, or using a calc (not as nice) to concatenate the values
together. The Submit button, again if you like, can place spaces, hyphen,
and/or parentheses wherever you like, although my preference is for simple
10 character string (text).
--

John Weinshel
Datagrace
Associate Member, Filemaker Solutions Alliance
Vashon Island, WA
(206) 463-1634



Quote:
> Hi,

> Is it possible to validate the entry of phone numbers such as "555 777
> 9999" so that there are the spaces in between and all 10 characters are
entered?

> --
> Thanks,
> Cesar A. Iriarte
> Systems Director

> |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

>  Iris Internet Solutions
>   http://www.ciris.net


>   phone: 361.884.9000
>   fax: 361.883.1786
> |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||



Tue, 04 Nov 2003 02:31:22 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Blank entry validation.

2. Entry Validation of Database Fields

3. User entry validation.

4. User entry validation

5. Auto entry&validation in globals

6. Time entry/validation

7. Data Entry - Duplicate Entries

8. Limit data Entry to stop no entry

9. HELP - Suggestions for Double Entry techniques for Data Entry

10. Data Validation with ADO and Data Grid

11. Help, js form validation vs sql validation?

12. Global validation table vs. separate validation tables


 
Powered by phpBB® Forum Software