Solved

Proper Case Question - State Abbreviation

Posted on 2011-09-30
6
623 Views
Last Modified: 2013-12-18
I use a formula in Notes (version 5) to display address information on documents in the following format:

2215 Sanders Road, 0581796
Northbrook, Il 60062
(800) 111-2222
(800) 333-4444 Fax

The formula is:

@ProperCase(PHP_ADR_LN1) + ",  " + @ProperCase(LOC_CD) +
@NewLine + @ProperCase(PHP_ADR_LN2) +
@NewLine + TEM_CBK_PHN_NB +
@NewLine + TEM_FAX_NB + "  " + "Fax"

The PHP_ADR_LN2 component contains the City, State and Zip Code information.  What I need to do is to display the state abbreviation in UPPER Case while leaving the rest of the information in PROPER case.  

Assuming that I don't ask the data provider to modify their format, how should I approach this problem?

Thanks in advance for your help

Mike
0
Comment
Question by:BulldogMike
  • 3
  • 3
6 Comments
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 36893020
This should do it.  Just set the value variable to your PHP_ADR_LN2 variable.

value := "city, state zip";
stateZip := @RightBack(value; ", ");
city := @LeftBack(value; ", ");
state := @LeftBack(stateZip; " ");
zip := @RightBack(stateZip; " ");
@ProperCase(city) + ", " + @UpperCase(state) + " " + zip
0
 

Author Comment

by:BulldogMike
ID: 36893373
Hi

Sorry I am a beginning programer and I lack the experience of many people who use this sight.  This is how I modified the code based on your answer and it errors out requesting "an operator or a semicolon was expected but none was found".

Please advise it appears I don't understand how to set the value variable to the PHP_ADR_LN2 variable

value := "city, state zip";
PHP_ADR_LN2 = value;
stateZip := @RightBack(value; ", ");
city := @LeftBack(value; ", ");
state := @LeftBack(stateZip; " ");
zip := @RightBack(stateZip; " ");
@ProperCase(city) + ", " + @UpperCase(state) + " " + zip

@ProperCase(PHP_ADR_LN1) + ",  " + @ProperCase(LOC_CD) +
@NewLine + @ProperCase(value) +
@NewLine + TEM_CBK_PHN_NB +
@NewLine + TEM_FAX_NB + "  " + "Fax"
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 36893564
No problem, here ya go...

value := PHP_ADR_LN2;
stateZip := @RightBack(value; ", ");
city := @LeftBack(value; ", ");
state := @LeftBack(stateZip; " ");
zip := @RightBack(stateZip; " ");
@ProperCase(city) + ", " + @UpperCase(state) + " " + zip
0
ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 500 total points
ID: 36893583
FYI: That will give you just the formatted City, State Zip format.

For your entire formula, you would use this...


value := PHP_ADR_LN2;
stateZip := @RightBack(value; ", ");
city := @LeftBack(value; ", ");
state := @LeftBack(stateZip; " ");
zip := @RightBack(stateZip; " ");
formattedCityStateZip := @ProperCase(city) + ", " + @UpperCase(state) + " " + zip;

@ProperCase(PHP_ADR_LN1) + ",  " + @ProperCase(LOC_CD) +
@NewLine + formattedCityStateZip +
@NewLine + TEM_CBK_PHN_NB +
@NewLine + TEM_FAX_NB + "  " + "Fax";
0
 

Author Comment

by:BulldogMike
ID: 36893708
Bill

Your code looks good

Got any idea why my code below errors out now and requests a semicolon or an operator where the 2nd parenthese is of (PHP_ADR_LN1) statement - I don't see a problem with this coding.  Is it confusing PHP_ADR_LN1 with PHP_ADR_LN2?
 
@ProperCase(PHP_ADR_LN1) + ",  " + @ProperCase(LOC_CD) +
@NewLine + value +
@NewLine + TEM_CBK_PHN_NB +
@NewLine + TEM_FAX_NB + "  " + "Fax"

Thanks

Mike
0
 

Author Closing Comment

by:BulldogMike
ID: 36893739
Very helpful expert
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 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