cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnRavas
Level: Powered On

How do I format a field to look like currency

I have a form that is connected to a SharePoint list.  One of the fields is a Currency field.  However, the form will not allow me to display the field as currency.  The only choices I seem to have are text or number.  When in display mode, I would like it to be formated like $500.00.

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How do I format a field to look like currency

I enriched this solution such that it displays the currency field numeric value format as a Number in Edit mode for the Form, and then using the same Input Box control it displays the field as a currency value when the form is in View mode. This seemingly negates the need to have multiple controls on the form (hidden or visible) which naturally then makes the form easier to edit and manage as addional fields are added and/or the form functionality in enhanced!

 

Displaying numeric fields as Currency in PowerApps

View solution in original post

5 REPLIES 5
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: How do I format a field to look like currency

You can update the Text property of the label that is used to display the value, and use a custom expression that displays the format as you want. Below is one way how you can do that.

CustomizeCurrencyField.gif

JohnRavas
Level: Powered On

Re: How do I format a field to look like currency

Thanks for the reply @CarlosFigueira  What you show makes sense.  However, when I go into the advanced properties for my field , I don't have a Text property like you do - see my screenshot.  Under the Properties tab, my Format is set to number as I don't want people entering text in the field.  Hopefully I am missing something simple.

PowerApps Staff CarlosFigueira
PowerApps Staff

Re: How do I format a field to look like currency

Ah, you're using an Edit form, in View mode. For that case (which uses a text input control) there's no way to directly set the format of the data that is going to be displayed.

 

One thing you can do is to have two controls, the text input that comes with the card, and add another label on top of it. Depending on the mode of the form, you can toggle the Visible property of the controls, like in the set of properties below:

DataCardValueX.Visible: EditForm1.Mode <> FormMode.View
NewLabelInCard.Visible: EditForm1.Mode = FormMode.View
NewLabelInCard.X: DataCardValueX.X
NewLabelInCard.Y: DataCardValueX.Y
NewLabelInCard.Height: DataCardValueX.Height
NewLabelInCard.Width: DataCardValueX.Width
NewLabelInCard.Text: Text(Parent.Default, "[$-en-US]$0.00")
Community Support Team
Community Support Team

Re: How do I format a field to look like currency

Hi @JohnRavas,

 

Could you please share a bit more about your app's configuration?

Do you want the field within your Display form or Edit Form to be formatted like currency?

 

I have made a test on my side, please take a try with the following steps:

  • Unlock the DataCard where you want to format the field to currency.
  • Within the DataCard, select the TextInput control.
  • Within right panel, set Default property to following formula:
Text(Parent.Default,"[$-en-US]$#,###.00")

or 

Text(Parent.Default,"[$-en-US]$#.00")

Image reference:1.JPG

 

More details about the Text function in PowerApps, please check the following article:

Text function

 

 

Best regards,

Kris

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

Re: How do I format a field to look like currency

I enriched this solution such that it displays the currency field numeric value format as a Number in Edit mode for the Form, and then using the same Input Box control it displays the field as a currency value when the form is in View mode. This seemingly negates the need to have multiple controls on the form (hidden or visible) which naturally then makes the form easier to edit and manage as addional fields are added and/or the form functionality in enhanced!

 

Displaying numeric fields as Currency in PowerApps

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Kudoed Authors
Users Online
Currently online: 297 members 6,173 guests
Recent signins:
Please welcome our newest community members: