FMPRO-L Archives

February 2011, Week 1

FMPRO-L@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Richard S. Russell" <[log in to unmask]>
Reply To:
FileMaker Pro Discussions <[log in to unmask]>
Date:
Fri, 4 Feb 2011 14:24:30 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (18 lines)
On 2011 Feb 4, at 10:25, Rick O'Quinn wrote:

> I've got a few fields that I need to keep to one line, but not one word. Most are First Name, Last Name fields. I want to make sure users can't enter a carriage return OR any other random characters, such as another name. BUT entering 2 or more words (names) on one line is okay.... 
> 
> Is there an easier way?


I offload the responsibility onto the person doing the data entry by using (always) "Validate by Calculation" and this formula:

PatternCount ( Author First; "¶" ) = 0 and 
Left ( Author First; 1 ) ≠ " " and 
Right ( Author First; 1 ) ≠ " "

with the following error message on failure:

"Author First" may not contain a return character or begin or end with a space.

I use a similar validation in lots of other places where this kind of error is likely to crop up.

ATOM RSS1 RSS2