cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Decimal places

Hello,

 

when i enter value 0.0500 in SQL database i see 0.05

 

How could i save full value with zeros, just 0.0500 ?

 

Thank you

Jakub

6 REPLIES 6
Highlighted
Microsoft
Microsoft

Re: Decimal places

Hello @Flashback 

If your goal is to set a specific format of your text then please check the following page: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-text

Highlighted
Frequent Visitor

Re: Decimal places

Hello,

 

i tried enter this formula to "Update" Text(DataCardValue13_1.Text, "[$-en]##.#####")

 

DataCardValue13_1 is text input with entered numbers

 

But i still receive rounded numbers 0.06 instead 0.0600

 

 

Highlighted
Microsoft
Microsoft

Re: Decimal places

Sorry. I misunderstood the original question. Are you looking to have the value stored in SQL as formatted? If so then I would recommend keeping the value as it is in SQL and formatting it on the client instead. In your case, you can just format the value shown in PowerApps Form card (apply the text formatting on the TextInput control or Label control that displays it, not on card update). Wil lthis work?

Highlighted
Community Support
Community Support

Re: Decimal places

Hi @Flashback ,

This is about SQL Server, not PowerApps.

Could you tell me this field's data type?

If it is float, system will only save valid float number by default.

I suggest you update your data type to this:9245.PNG

Then, 4 decimal places will be saved.9246.PNG

 

 

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.
Highlighted
Frequent Visitor

Re: Decimal places

I tried all data types i think.

 

But this is app for balances.

 

And some balances weight on 4 decimal places and some on 5 decimal places.

 

If i use decimal type (18,5), so... if user enter 0.0500 (only 4 decimal places) in SQL will be add 5th place and in app i will see 0.05000

 

 

Highlighted
Community Support
Community Support

Re: Decimal places

Hi @Flashback ,

This is about SQL Server's setting, regardless of PowerApps.

Since there are many "000" in your data  is invalid, so if you want to retain them, you should be clearly whether you want to save 4  decimal places or 5  decimal places.

If you want to save 4 decimal places, please set type (18,4).

If you want to save 5 decimal places, please set type (18,5).

 

 

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,276)