cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jfiszer110
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
v-yutliu-msft
Community Support
Community Support

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
WarrenBelz
Super User
Super User

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

mdevaney
Super User
Super User

@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." 

@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.

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...

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

v-yutliu-msft
Community Support
Community Support

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.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,894)