web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Convert country to ISO
Power Apps
Unanswered

Convert country to ISO

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Is there a way I can get someones ISO code from their email? I want the default of one of my searches to be by the persons ISO country code. If I use Office365Users.UserProfileV2(User().Email).country it will give the entire name. Is there a way I can convert this to ISO?

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous 

    You can download the Excel file from https://datahub.io/core/country-list , convert it to a table and connect it to your app with the Excel static connector.  Then you can use a lookup() to that table. 

    Lookup(Table1,Name=Office365Users.UserProfileV2(User().Email).country,Code)

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It says the function lookup has invalid arguments

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It just says false

  • FelixK Profile Picture
    36 on at

    I had a similar issue in a HTTP GET providing me ISO3 country code and I needed to pass this to a HTTP PUT endpoint expecting a ISO2 country code. Example "DEU" -> "DE". 
    My Solution:

    FelixK_0-1679700492284.png

     


    - Compose element with an json array of all countries [{"ISO3":"DEU", "ISO2":"DE"}, {250 more countries}..]

    - Filter this array with your needed country code as a filter criteria

    - The filter result is your needed ISO2 country value

    Attached my converter flow. 

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 490

#2
WarrenBelz Profile Picture

WarrenBelz 375 Most Valuable Professional

#3
11manish Profile Picture

11manish 302

Last 30 days Overall leaderboard