web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Setting Decimal Precis...
Power Apps
Unanswered

Setting Decimal Precision on Edit Form Input

(0) ShareShare
ReportReport
Posted on by 14

Hello everybody.

 

I am working with a Form that is attached to a SQL connection, which was used to create the fields within the form (so numeric vs. text vs. bit, etc.).

 

I am trying to figure out a way to setup decimal precision on the input side, because I need the numbers to be transferred to SQL with the correct amount of precision because the data is then being pulled from SQL into PowerBI.

 

For example, one of my fields is "pH", and is technically a Text Input with the Format property set to TextFormat.Number. I need to set it up so that when the user enters a number (let's say "6"), it automatically adds a precision of one decimal place ("6.0"). Or, if they enter "6.75", it rounds to "6.8".

 

I have seen numerous ways to do this on the return (in a ViewForm), but none for submitting or editing data via an EditForm.

 

Thanks and let me know if I can clarify anything!

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Adamjs11 

    This would be done in the Update property of the data card containing the TextInput box.  Where normally it would just say something like DataCardValue1.Text, change it to Round(DataCardValue1.Text,6), for example to round it up or down to 6 decimal places.   

  • Adamjs11 Profile Picture
    14 on at

    @Drrickryp 

     

    That is a great solution and immensely helpful as it will allow me ensure that the numbers are rounded on transfer, thank you!

     

    Do you (or anyone else) know of a way that I can update the input on screen so (perhaps utilizing the "OnChange" property), so that my users can also see the rounded numbers before they submit the form? 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    I would probably change the DataCardKey from Parent.DisplayName to the 

     

    Parent.DisplayName &" will be recorded as "& RoundDown(DataCardValue1.Text, 6)

    That would show the user in real time what the value would be.  Why wait?

     

  • Adamjs11 Profile Picture
    14 on at

    @Drrickryp 

     

    That makes sense, but I would prefer for just the input box to show what the recorded value would be, instead of having the number appear twice, as I feel that would clog my form up with extras. Here is what my input looks like now:

     

    Input.PNG

    After the user either clicks off of it, I'd like that to add the precision of one decimal place, or round it if decimals already exist.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 321

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 311 Super User 2025 Season 2

Last 30 days Overall leaderboard