Main Page | Report this Page
Computers Forum Index  »  Computer - Databases - Filemaker  »  How do I validate these fields...
Page 1 of 1    

How do I validate these fields...

Author Message
davepres...
Posted: Sat Oct 03, 2009 1:41 pm
Guest
Hi there

FMPro10adv. Vista

I have 2 fields I would like to validate.

1) This is a text field and we input numbers but they must be 4 digits
eg 0412 or 1014. I want a message or warning if anything other than 4
digits is entered

2) I have a date field and in the validate section I can only find
"validate for 4 digit year". I just want to make sure there is a valid
date eg 12/11/2009 or 05/10/14. (Australia uses dd/mm/yy or dd/mm/
yyyy)

Thanks in advance

David
 
Jens Teich...
Posted: Sat Oct 03, 2009 6:35 pm
Guest
davepres <davidpreswick at (no spam) gmail.com> writes:

Quote:
1) This is a text field and we input numbers but they must be 4 digits
eg 0412 or 1014. I want a message or warning if anything other than 4
digits is entered

Validate by calculation: length( text ) = 4

Quote:
2) I have a date field and in the validate section I can only find
"validate for 4 digit year". I just want to make sure there is a valid
date eg 12/11/2009 or 05/10/14. (Australia uses dd/mm/yy or dd/mm/
yyyy)

FileMaker does this for you and will not accept other than valid date data.

Jens

--
FileMaker Konferenz in Zürich Mai 2010
http://filemaker-konferenz.com (german)
 
Ursus...
Posted: Sat Oct 03, 2009 11:08 pm
Guest
"Jens Teich" <spamtrap at (no spam) jensteich.de> schreef in bericht
news:m24oqgr1dm.fsf at (no spam) jensteich.de...
Quote:
davepres <davidpreswick at (no spam) gmail.com> writes:

1) This is a text field and we input numbers but they must be 4 digits
eg 0412 or 1014. I want a message or warning if anything other than 4
digits is entered

Validate by calculation: length( text ) = 4

and make it numbers only

Quote:

2) I have a date field and in the validate section I can only find
"validate for 4 digit year". I just want to make sure there is a valid
date eg 12/11/2009 or 05/10/14. (Australia uses dd/mm/yy or dd/mm/
yyyy)

FileMaker does this for you and will not accept other than valid date
data.

Jens

--
FileMaker Konferenz in Zürich Mai 2010
http://filemaker-konferenz.com (german)



--
Keep well / Hou je goed

Ursus
 
davepres...
Posted: Sun Oct 04, 2009 9:01 am
Guest
Thanks Ursus

Both your answers are right but I still have a problem. These fields
are in a portal and I am updating existing records. Although I have
put the Length validation , it only alerts me if I click outside the
portal - it alows me to put in the data with no warning at all.

David


On Oct 4, 6:08 am, "Ursus" <ursus.k... at (no spam) ziggo.nl> wrote:
Quote:
"Jens Teich" <spamt... at (no spam) jensteich.de> schreef in berichtnews:m24oqgr1dm.fsf at (no spam) jensteich.de...

davepres <davidpresw... at (no spam) gmail.com> writes:

1) This is a text field and we input numbers but they must be 4 digits
eg 0412 or 1014. I want a message or warning if anything other than 4
digits is entered

Validate by calculation: length( text ) = 4

and make it numbers only



2) I have a date field and in the validate section I can only find
"validate for 4 digit year". I just want to make sure there is a valid
date eg 12/11/2009 or 05/10/14. (Australia uses dd/mm/yy or dd/mm/
yyyy)

FileMaker does this for you and will not accept other than valid date
data.

Jens

--
FileMaker Konferenz in Zürich Mai 2010
http://filemaker-konferenz.com(german)

--
Keep well / Hou je goed

Ursus
 
Ursus...
Posted: Sun Oct 04, 2009 7:52 pm
Guest
Well that is to be expected. Filemaker normally only validates what you have
entered when the record is commited. This is the moment you click outside
the portal. On its own FMP has no way to know what you are entering and if
it is valid while you are entering data. You might start correct, but only
make a mistake on the last digit you enter. It is like calculations, they
also only update on commit record.

Since you have FMP10 you can built a field trigger. In this way a script is
run every time you press a keyboard-key when you are inside the specified
field. The script must then do the validation for you. Make those
validations as short as you can. You can easily see that a script with 100
lines of code, that fires with every key, will slow down your solution
intolerably.

Keep well / Hou je goed

Ursus
"davepres" <davidpreswick at (no spam) gmail.com> schreef in bericht
news:41bdfb00-7e86-43c2-9105-7f339f25a4c5 at (no spam) m7g2000prd.googlegroups.com...
Thanks Ursus

Both your answers are right but I still have a problem. These fields
are in a portal and I am updating existing records. Although I have
put the Length validation , it only alerts me if I click outside the
portal - it alows me to put in the data with no warning at all.

David


On Oct 4, 6:08 am, "Ursus" <ursus.k... at (no spam) ziggo.nl> wrote:
Quote:
"Jens Teich" <spamt... at (no spam) jensteich.de> schreef in
berichtnews:m24oqgr1dm.fsf at (no spam) jensteich.de...

davepres <davidpresw... at (no spam) gmail.com> writes:

1) This is a text field and we input numbers but they must be 4 digits
eg 0412 or 1014. I want a message or warning if anything other than 4
digits is entered

Validate by calculation: length( text ) = 4

and make it numbers only



2) I have a date field and in the validate section I can only find
"validate for 4 digit year". I just want to make sure there is a valid
date eg 12/11/2009 or 05/10/14. (Australia uses dd/mm/yy or dd/mm/
yyyy)

FileMaker does this for you and will not accept other than valid date
data.

Jens

--
FileMaker Konferenz in Zürich Mai 2010
http://filemaker-konferenz.com(german)

--
Keep well / Hou je goed

Ursus
 
davepres...
Posted: Mon Oct 05, 2009 5:51 am
Guest
Thanks Ursus,

All vey clear now. Much appreciated.

David
 
 
Page 1 of 1    
All times are GMT
The time now is Tue Dec 08, 2009 7:36 am