Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have in a call system, a field named Subject in which users input data related to the phone call received. They set the important data with the first character of the word capitalized. I would need a Custom Function that will extract that data in list. Needless to say that such data will be used for self-join relationship for portal fast searching.

Example.

Input (courtesy of Macintouch)}:(

Charismac released Discribe 6, an update of its CD and DVD burning software. This release is a Universal Binary and includes Leopard compatibility and an improved interface.

Output:

Charismac

Discribe

CD

DVD

Universal

This

Binary

Leopard

Thanks in advance.

Posted (edited)

Not tested (that's a challenge !)

Requires CustomList

CustomList ( 1 ; WordCount ( text ) ; "let ([ $w = middlewords ( text ; [n] ; 1 )] ; case ( not isempty ( filter ( $w ; upper ( $w ))) ; $w ))")

Edited by Guest
Posted

case ( not isempty ( filter ( $w ; upper ( $w ))) ; $w )

I believe that would extract any word that CONTAINS a capital character (not necessarily the first character), and also any word that contains a number (or any other symbol that doesn't have upper/lower variants).

I would try:

ProperWords ( text) =


Let ( [

word = LeftWords ( text ; 1 ) ; 

countWords = WordCount ( text )

] ;

Case ( not IsEmpty ( Filter ( Left ( word ; 1 )  ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) ) ; word & ¶ )

&

Case ( countWords > 1 ; ProperWords ( RightWords ( text ; countWords - 1 ) ) )

)

Posted

I believe that would extract any word that CONTAINS a capital character (not necessarily the first character), and also any word that contains a number (or any other symbol that doesn't have upper/lower variants).

True, it should be filter ( left ( $w ; 1 )....

But filtering only our 26 capital letters would omit Å, Ç... and other beautiful things this world contains }:(

Posted

filtering only our 26 capital letters would omit Å, Ç... and other beautiful things this world contains

True, and if any of those "beautiful" characters are expected, you need to modify your filtering string.

Otherwise you will get a false positive on a word that begins with a numeric character. Or a word that begins with the micro sign, e.g. "µmeter". Or any word that begins with an Arabic character... (as long as we are being esoteric).

Posted

Hi,

Thanks a lot to all posters.

Both Fabrice CustomList's twist and comment's ProperWords do work flawlessly. As indicated after the Spanish special characters need minimal recode in comments' work. :clap:

BTW I checked before posting BDunning's site but I worked on the "extract" and Uppercase keywords thus CustomList did not appear. Also tried in FMForums searching.

I also have to reckon the tremendous work behind that CustomList's function. Agnes, Fabrice... what a coding! :eeek:

Yours,

Posted

That's only Agnès' work. But I agree, it's brilliant, to say the least.

This topic is 6077 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
×
×
  • Create New...

Important Information

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