Solved

Proper Case Question - State Abbreviation

Posted on 2011-09-30
6
626 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
[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
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 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