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 / Get Currency from a Te...
Power Apps
Answered

Get Currency from a Text String

(0) ShareShare
ReportReport
Posted on by 314

Hi,

The user will entry a string such as "123456.78USD" or "9,876,543HKD".  The number will be different time and the currency code will also in different code.

And, I'd like to get the number out from the string and show in currency format with currency code, how can I do that?

For example:

Input:  123456.78USD

Output: 123,456.78 USD

 

Input:  9,876,543HKD

Output: 9,876,543.00 HKD

Thanks!

Categories:
I have the same question (0)
  • FMontesRNX1 Profile Picture
    147 on at

    So you'll only separate the string? This will create a registry on separate fields?
    Here some ideas:
    For get the number:
    Value(Left(YourString.Text,Len(YourString.Text)-3))
    You can also transform the value using something like: Text(value,"#,#") or as required.

    For get the currency:
    Right(YourString.Text,3)  -Considering ISO 4217

    You can use both to make another data operations (like convert between currencies), only be careful with circular references.

  • usaman45 Profile Picture
    314 on at

    Thanks for the idea, I have a question is if the string is not always has 3 characters at end. Then, what is the best way to get the number out from the string?  thanks!

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @usaman45,

    Do you want to extract only the currency input within the TextInput?

     

    Here is the Rex that I use to achieve your need.

    Match(TextInput6.Text,"\d+.\d+").FullMatch

    vqiaqimsft_0-1649911234511.png

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard