Solved

Propercase can't handle apostrophys

Posted on 2006-06-16
5
503 Views
Last Modified: 2012-06-27
When using Propercase on a company's name I get false output if there is an apostrophy in the string.  Example:  From Propercase({CompanyName})  on "JEFF'S FIRM" I get:  "Jeff'S Firm" instead of the assumed correct output: "Jeff's Firm"   Can anybody help with a workaround on this solution?  I tried Replace(Propercase([CompanyName]), "'S","'s"), however, it didn't work.  Any ideas?
0
Comment
Question by:randybdavis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 16922888
I'm surprised that what you tried didn't work because it does work for me - maybe a difference in versions.

   replace(propercase("Joe's Diner"),"'S","'s")

The above returns "Joe's Diner" exactly as you'd want.  You might want to try forcing the lower case conversion like this:

   replace(propercase({CompanyName}),"'S",lcase("'s"))



frodoman
0
 

Author Comment

by:randybdavis
ID: 16923036
Hi frodoman,

I used your code and this is the output:

Company Name (Lessee or Owner): Jeff`S Firm
0
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 16923118
Are you certain that the apostrophe is really an apostrophe?  For example, could it be the accent mark that's normally under the tilde (~) on the keyboard?  Although in many fonts they look identical the ascii code for them is different so your replace won't find it unless you use the same accent character in your formula.

frodoman
0
 

Author Comment

by:randybdavis
ID: 16923172
Hey frodoman,

Congradulations,  you won!!!  It was that character under the tilde.

Thank you.  :-)
0
 
LVL 42

Expert Comment

by:frodoman
ID: 16923247
You're welcome - glad I could help.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

736 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question