I agree with the approach suggest - although you have to be careful
about people with non-english names that have things like "van" or
"de" as part of the name. This would cause three words - not two.
Also - people may assume you want their full name (including all middle names).
The first problem can be solved using ListFirst and ListRest
(supplying the SPACE as the separator). And then concatenating
everything in ListRest.
But..... the real problem of accurately gathering first and last name
can only be better solved by having two fields that clearly indicate
what is required in both.
NOTE: some countries (generally Asian and some middel-eastern) the
family name of the person comes first. So you will often see a site
asking for GIVEN name and FAMILY name. And, understand that just
because the database calles them "firstname" and "lastname" does not
mean that the labels next to the fields on the form can't say anything
you want.
If the database expects it to be in two fields - ask for it from the
user in two fields and name them accurately/approproately so you get
the best data quality.
Regards,
Gary
On Sun, 21 Nov 2004 09:01:29 +1100, Phil Evans <[EMAIL PROTECTED]> wrote:
> Hi Chris,
>
> Treat the variable as a space delimited list, and use
> ListGetAt(name_field,1,' ') to get first name, ListGetAt(name_field,2,' ')
> for surname.
> This assumes that there is a space in the first place. You may want to do a
> Find(' ', name_field) first.
>
> Phil.
>
>
>
> ----- Original Message -----
> From: "Chris Ellem" <[EMAIL PROTECTED]>
> To: "CFAussie Mailing List" <[EMAIL PROTECTED]>
> Sent: Sunday, November 21, 2004 8:46 AM
> Subject: [cfaussie] Seperate fullname captured via form into firstname and
> lastname if seperated by a space
>
> > Seperate fullname captured via form into firstname and lastname if
> > seperated by a space.
> >
> > Is there an easy way to do this? .data going to an access database.
> >
> > Regards
> >
> > Chris
> >
> > ---
> > You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
>
>
> > To unsubscribe send a blank email to
> [EMAIL PROTECTED]
> > Aussie Macromedia Developers: http://lists.daemon.com.au/
> >
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
>
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/