The HotDocs Computation Archive
Get Extra Help

0075 - State, Commonwealth, or D.C

Description:

Places "The State of ...", "The Commonwealth of ...", etc. before a state name as appropriate.


• Code •

IF StateName CONTAINS "district of columbia"
OR StateName CONTAINS "dc"
OR StateName CONTAINS "D.C."
   "the District of Columbia"
ELSE IF
   "massachusetts" +
   "virginia" +
   "kentucky" +
   "pennsylvania" +
   "puerto rico" CONTAINS StateName
   "the Commonwealth of «StateName»"
ELSE
   "the State of «StateName»"
END IF

• Explanation •

This computation looks at the variable "StateName" (either a text or a multiple-choice variable), and determines whether it should be called "the Commonwealth of ..." or "the State of ...", or, in the case of Washington D.C., "the District of Columbia." The computation returns the full state designation.