Jump to content
Salesforce and other SMB Solutions are coming soon. ×

First letter of many words


sallymartin
 Share

Recommended Posts

Hi all

I'm very new at this. I am trying to write a calculation to select the first letter from the text in a field. The field is Production Names. It contains things like Witches of Eastwick, Mystery of Edwin Drood etc., so it has a combination of upper and lower letters and a varying number of words. I would like to end up with WoE or MoED.

 

I have read previous posts and am able to get all the upper letter by Filter but I would like to have the lower ones too.

 

Suggestions would be most welcome.

SallyM

Link to comment
Share on other sites

If you have a maximum number of words for your source field, you could build a calc to look at each one (use the WordCount() and MiddleWords() functions), then grab the first letter of each and append them together. If the number of words is indeterminant, I think you'd need a recursive custom function so scan through the field and return the first letter of each word.

 

But what the heck is this for?? Are you building some crazy acronym database? Are you going to run into any problems when someone adds "Warnings of Egor" or "Moms on Elephant Drugs"?

Link to comment
Share on other sites

Thanks Ender ... I think .... I will digest and try to make sense of this.

 

You have probably picked the correct problem. I'm not sure what I'm doing. I am trying to write a db that tracks people, jobs(roles), productions. Lots of people have lots of roles in lots of productions. So I thought I could use short production names in some places ... then become obsessed with how to do this. Sorry ...

 

Mom's on Elephant Drugs won't be a problem (although it may be for them) because each production has a year as part of the calculation - so MoED 09 - gee I can't wait for that musical to be released.

 

Cheers

SallyM

Link to comment
Share on other sites

I can get the MiddleWords but I don't know how to 'grab the first letter of each' . I am sure this is basic sort of stuff ... but ....

 

Cheers

SallyM

Link to comment
Share on other sites

.. one of the great things about these sorts of forums is that while you wait for an answer to solve all your problems you think about your challenge differently. I love it!

 

I solved my own problem! With your help of course. My solution may not be elegant, and it certainly wasn't quick in coming .. but it works. Now I just have to work out what to do with it.

 

Cheers

SallyM

Link to comment
Share on other sites

Just in case you were wondering, this would grab the first letter of the first word in the Title field:

 

Left(MiddleWords(Title; 1; 1); 1)

 

So you could grab the first letters of the up to the first five words with:

 

Left(MiddleWords(Title; 1; 1); 1) &

Left(MiddleWords(Title; 2; 1); 1) &

Left(MiddleWords(Title; 3; 1); 1) &

Left(MiddleWords(Title; 4; 1); 1) &

Left(MiddleWords(Title; 5; 1); 1)

Link to comment
Share on other sites

Thanks David .... that was exactly what I had come up with (took me forever though - oh well, at least I am starting to understand it - a bit!).

 

Cheers

SallyM

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use