Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

State names to USPS abbreviations

(0) ShareShare
ReportReport
Posted on by 14
Hello, 
 
I hope someone can help me here. 
I am trying to convert/replace state name to abbreviation in power automate. 
Here is my goal. I get form submission which contains state name. I would like to convert whatever the state name I get from form submission to abbreviation. 
 
For example, someone submit form with state name "California": I would like to convert that answer to "CA", and use that field with "create item" in sharepoint action. 
 
Is there any way to achieve this? 
 
Thank you in advance! 
Categories:
  • trice602 Profile Picture
    trice602 11,848 on at
    State names to USPS abbreviations
    Chriddle,
     
    Brillant!
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     
  • Chriddle Profile Picture
    Chriddle 7,371 on at
    State names to USPS abbreviations
    Create a Compose ('Compose-Abbreviation') with the following object:
    {
    	 "Alabama": "AL",
    	 "Alaska": "AK",
    	 "American Samoa": "AS",
    	 "Arizona": "AZ",
    	 "Arkansas": "AR",
    	 "California": "CA",
    	 "Colorado": "CO",
    	 "Connecticut": "CT",
    	 "Delaware": "DE",
    	 "District Of Columbia": "DC",
    	 "Federated States Of Micronesia": "FM",
    	 "Florida": "FL",
    	 "Georgia": "GA",
    	 "Guam": "GU",
    	 "Hawaii": "HI",
    	 "Idaho": "ID",
    	 "Illinois": "IL",
    	 "Indiana": "IN",
    	 "Iowa": "IA",
    	 "Kansas": "KS",
    	 "Kentucky": "KY",
    	 "Louisiana": "LA",
    	 "Maine": "ME",
    	 "Marshall Islands": "MH",
    	 "Maryland": "MD",
    	 "Massachusetts": "MA",
    	 "Michigan": "MI",
    	 "Minnesota": "MN",
    	 "Mississippi": "MS",
    	 "Missouri": "MO",
    	 "Montana": "MT",
    	 "Nebraska": "NE",
    	 "Nevada": "NV",
    	 "New Hampshire": "NH",
    	 "New Jersey": "NJ",
    	 "New Mexico": "NM",
    	 "New York": "NY",
    	 "North Carolina": "NC",
    	 "North Dakota": "ND",
    	 "Northern Mariana Islands": "MP",
    	 "Ohio": "OH",
    	 "Oklahoma": "OK",
    	 "Oregon": "OR",
    	 "Palau": "PW",
    	 "Pennsylvania": "PA",
    	 "Puerto Rico": "PR",
    	 "Rhode Island": "RI",
    	 "South Carolina": "SC",
    	 "South Dakota": "SD",
    	 "Tennessee": "TN",
    	 "Texas": "TX",
    	 "Utah": "UT",
    	 "Vermont": "VT",
    	 "Virgin Islands": "VI",
    	 "Virginia": "VA",
    	 "Washington": "WA",
    	 "West Virginia": "WV",
    	 "Wisconsin": "WI",
    	 "Wyoming": "WY"
     }
     
    Use it with an expression like this:
    outputs('Compose-Abbreviation')['California']
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard