Solved

Proper Case Question - State Abbreviation

Posted on 2011-09-30
6
620 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now