cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Display Input as Currency

I need to display the number input in the DataCardValue11 as currency. I don't need any decimal places just the $ symbol and ###,###,### . Can you help please?

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Display Input as Currency

Hi @jfiszer110 ,

Do you want to format the data that you enter in the textinput?

Could you describe more clearly about the time that you want to format the entered data? when you finish typing or when you are typing?

I'm afraid powerapps could only distinguish whether you've finished typing automatically.

And there's no property that can change the entered data format when you are still typing.

Both "OnSelect" and "Onchange" action will not be triggered when you are still entering data in the textinput.

So, you need to make an action to tell powerapps that you've finished typing to trigger OnSelect or OnChange property, for example, click the blank place or click the textinput again.

 

 

Here are two ways to format, the format time is a little different. You could choose based on your demands.

Both them works when you've finished typing and do another action like I listed above.

1)set OnSelect

set the textinput's OnSelect:

 

Set(var,Text(RoundDown(Value(TextInput1.Text),0),"[$-en-US]$###,###,###"));Reset(TextInput1)

 

set the textinput's Default:

 

var

 

In this solution, after you type data in the textinput, the data format will be changed when you click the textinput again.

Just like this gif:

2178.gif

 

2)set OnChange

set the textinput's OnChange

 

 

Set(var,Text(RoundDown(Value(TextInput1.Text),0),"[$-en-US]$###,###,###"));Reset(TextInput1)

 

 

set the textinput's Default:

 

 

var

 

 

In this solution, after you type data in the textinput, the data format will be changed when you click the blank place.

Just like this gif:

2179.gif

 Or you could also both set these two properties.Then after you enter data, you could click the textinput again or click the blank place, the data will both be formatted.

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Community Champion
Community Champion

Re: Display Input as Currency

Hi @jfiszer110 

Text(DataCardValue11,"$###,###,###")

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up

Highlighted
Super User
Super User

Re: Display Input as Currency

@jfiszer110 

Like this:

 

Text(Value(DataCardValue11.Text), "$###,###,###") 

 

 

Or if you want to see the leading zeros like this:

 

Text(Value(DataCardValue11.Text), "$000,000,000") 

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

Community Champion
Community Champion

Re: Display Input as Currency

@mdevaney is correct.

Mine would work referring to a numeric field value, but this is a control, which has a text value that needs to be converted.

Highlighted
New Member

Re: Display Input as Currency

Thanks for the quick response! I should have been more clear in my request. Is there a way to format the entry as it is being typed by the end-user? Realtime...

Highlighted
Super User
Super User

Re: Display Input as Currency

Try the different approaches listed in this article:
https://365basics.com/powerapps-3-different-ways-to-implement-currency-input-mask/

I have found all 3 of them to be very useful, you can choose the one that fits your use case (most likely the 3rd one for you).

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
https://thepoweraddict.com

Highlighted
Community Support
Community Support

Re: Display Input as Currency

Hi @jfiszer110 ,

Do you want to format the data that you enter in the textinput?

Could you describe more clearly about the time that you want to format the entered data? when you finish typing or when you are typing?

I'm afraid powerapps could only distinguish whether you've finished typing automatically.

And there's no property that can change the entered data format when you are still typing.

Both "OnSelect" and "Onchange" action will not be triggered when you are still entering data in the textinput.

So, you need to make an action to tell powerapps that you've finished typing to trigger OnSelect or OnChange property, for example, click the blank place or click the textinput again.

 

 

Here are two ways to format, the format time is a little different. You could choose based on your demands.

Both them works when you've finished typing and do another action like I listed above.

1)set OnSelect

set the textinput's OnSelect:

 

Set(var,Text(RoundDown(Value(TextInput1.Text),0),"[$-en-US]$###,###,###"));Reset(TextInput1)

 

set the textinput's Default:

 

var

 

In this solution, after you type data in the textinput, the data format will be changed when you click the textinput again.

Just like this gif:

2178.gif

 

2)set OnChange

set the textinput's OnChange

 

 

Set(var,Text(RoundDown(Value(TextInput1.Text),0),"[$-en-US]$###,###,###"));Reset(TextInput1)

 

 

set the textinput's Default:

 

 

var

 

 

In this solution, after you type data in the textinput, the data format will be changed when you click the blank place.

Just like this gif:

2179.gif

 Or you could also both set these two properties.Then after you enter data, you could click the textinput again or click the blank place, the data will both be formatted.

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,334)