Jump to content

NEED VERY URGENT HELP, pls.INDICATOR


ino
 Share

This topic is 5663 days old. Please don't post here. Open a new topic instead.

Recommended Posts

:bang:

How to split one space in SURNAMEName field which is not spitted?

Have a problem in database. I have lot of records with people

surname & name bat in format: SURNAMEName

MATICMato

MIKICMirko

NODILOIvan

RUBESAAleksndar

KALINICIvan

PRSODado and so on ...

[color:red]not spitted. I try out and try out bat don’t find the way to split them in format SURNAME Name.

Only [color:blue]INDICATOR which I have is that all SURNAME characters are UPPER LETERS (uppercase) and Name characters only first letter is uppercase.

Need suggestion how to split this field that [color:red]between SURNAME and Name i get (put) [color:red]one space (that field look like): SURNAME Name.

MATIC Mato

MIKIC Mirko

NODIL OIvan

RUBESA Aleksndar

KALINIC Ivan

PRSO Dado and so on ...

(calculation, Custom function, Script or : )

Platform OS x 10.4.6 fmp 8.03

Thanks in advance

:qwery: INO

Link to comment
Share on other sites

Try:

Let ( [

newText = text & "§" ;

lowerPart = Filter ( newText ; "abcdefhijklmnopqrstuvwxyz§" ) ;

pos = Position ( newText ; lowerPart ; 1 ; 1 ) - 2 ;

surname = Proper ( Left ( text ; pos ) ) ;

name = Right ( text ; Length ( text ) - pos )

] ;

surname & " " & name

)

Edited by Guest
Fixed a bug to deal with name contained in surname
Link to comment
Share on other sites

Very nice calculation comment. :clap:

I think that the only change that INO needs to make is to change the Proper to UPPER to get what he asked for.

Lee

Edited by Guest
Link to comment
Share on other sites

:worship: comment

WORKS ...!!!!

thanks a lot :thankyou:

Ino

:thumbdown: Lee, I try to do that, but problem is in first letter in Name (MARICMarko), because in that case only first letter in field is Uppercase,means that also in Name all letters are lowercase (Maricmarko ) but any how comment solved my problem.

bestR.

:hello:

Ino

Link to comment
Share on other sites

Hi INO,

Glad you're happy.

I just wanted to confirm that we were talking apples and apples here.

this Calculation

Let ( [

lowerPart = Filter ( FullName ; "abcdefhijklmnopqrstuvwxyz" ) ;

pos = Position ( FullName ; lowerPart ; 1 ; 1 ) - 2 ;

surname = [color:blue]Upper ( Left ( FullName ; pos ) ) ;

name = Right ( FullName ; Length ( FullName ) - pos )

] ;

surname & " " & name

)

Produces this

MARIC Marko

instead of

Maric Marko

Lee

Link to comment
Share on other sites

:thumbup: Hi Lee,

once again Thank you for + support.

When I try to solve the problem I try to use Upper and Lower format and as your replay was I understood that you mean on that.

Normally when I solve the problem with comment suggestion (calc) I exactly do what you suggest.

Thanks for as usual your care

Ino

Link to comment
Share on other sites

This topic is 5663 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.