Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Validation by Calculation (??)

0 views
Skip to first unread message

Diego B

unread,
Nov 10, 2009, 6:20:18 PM11/10/09
to
Hello everyone,

FM10 adv on Win XP here. I have a field for telephone number and I
would like to validate using the Filter function so that anything else
than
numbers would be filtered out:

Filter (phonenum; "0123456789") // where phonenum is a text type

All right, it looks short and simple, and indeed it works when I
script it but for a reason that I cannot explain,
when I put the same formula through valudation by calculation...it
does not do anything, I am free to write numbers, letters, or symbols
(- @...) with no validation at all.

I know I could run the validation using a script trigger but I would
prefer fix the issue with old plain filemaker (I am working in a
mixed environment and not everyone got FM 10), might you please help
in this ?

Thank you in advance !

Diego

Christoph Kaufmann

unread,
Nov 11, 2009, 11:28:21 AM11/11/09
to
Diego B <mess...@yahoo.it> wrote:

> Hello everyone,
>
> FM10 adv on Win XP here. I have a field for telephone number and I
> would like to validate using the Filter function so that anything else
> than
> numbers would be filtered out:
>
> Filter (phonenum; "0123456789") // where phonenum is a text type
>
> All right, it looks short and simple, and indeed it works when I
> script it but for a reason that I cannot explain,
> when I put the same formula through valudation by calculation...it
> does not do anything, I am free to write numbers, letters, or symbols
> (- @...) with no validation at all.

FWIW, this validation works on my FMP 8 Adv on OS X.4. Two thoughts,
though:

a) the Filter function reportedly may have problems if the your start
the second parameters with a zero. Try "1234567890".

b) You are free to enter anything; FMP will not validate your input
until you commit the record.
--
http://clk.ch

Diego B

unread,
Nov 11, 2009, 12:29:34 PM11/11/09
to

Hello Chistoph, first of all, thank you for the help.

> FWIW, this validation works on my FMP 8 Adv on OS X.4. Two thoughts,
> though:
>
> a) the Filter function reportedly may have problems if the your start
> the second parameters with a zero. Try "1234567890".

Ok, fixed !

>
> b) You are free to enter anything; FMP will not validate your input
> until you commit the record.

Good point, I created a small script to commit/revert the record but
validation still does not seem to work.
When I add the step to validate (script validation then) to the same
script, everything works as expected...a little bit puzzled here

Again, thank you !

Diego

0 new messages