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

Notifications

Announcements

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

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
    on at

    It says the function lookup has invalid arguments

  • Community Power Platform Member Profile Picture
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard