cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Remove trailing zeros on mobile

Hello everyone

 

I am making a time reporting application, with the goal of employees of a company being able to report how much time they've spent on a project on a daily basis. The 'time cards' are stored in a sharepoint list. 

 

Everything works as expected; except for the fact that the trailing zeros of my calculated 'total' column remain when accessing the application on my smartphone.

 

Below is a screenshot of the column 'total' on my smartphone version of the app.

 
 

Knipsel.PNG

I use the function Abs(ThisItem.Totaal) to show the item. When using Text(ThisItem.Totaal, "0.0") or simply Value(ThisItem.Totaal), the result remains the same.
Yet this is how the number looks when opening the application on desktop:

 

Knipsel2.PNG

I get this number from the sharepoint list that the timecards get saved to. "Totaal" is a calculated column, adding together all the individual columns of the week-days. "Totaal" is a number-field.

Knipsel3.PNG


Is there a way through which I can assure that the number shown on the mobile version of the app is the same as the one shown on the desktop version ? 

 







 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Changing my phone language to English did the job! Thank you for the insight.

 

View solution in original post

6 REPLIES 6
Pstork1
Dual Super User III
Dual Super User III

not sure why you are only seeing the trailing zeros on the mobile.  Given the formulas you are using it should show up on all platforms.  To remove the trailing zeros you should be using the following Text() function to format them.

Text(ThisItem.Totaal, "0.#") 

The '0' character in the formatting will show any digit or a Zero.  The '#' will only show any actual number.  Leading and trailing zeros will be removed.

 

After changing the formula make sure you save and publish.  If you don't publish the app won't be available for update on the mobile device.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
timl
Super User III
Super User III

Hi @Anonymous 

The cause of this will be a combination of two things.

There is a problem where SharePoint does not format calculated columns correctly. To remove the decimal places, a workaround you can try is to use the Round function instead, like so.

 

 

Round(
      Value(ThisItem.Totaal),
       0
)

 

 

There are more details in this post here:

https://powerusers.microsoft.com/t5/Building-Power-Apps/change-the-number-of-decimals-for-a-number/m-p/674626

 

I notice that you are using the English syntax in your formula (eg, where you separate the arguments in the Text function with a comma symbol). I guess your desktop machine is set up to use the English locale.

If the settings of your mobile device are set up to use a different language (I imagine Dutch), this can be a contributing factor because the default decimal separator would be comma symbol, rather than a period symbol. This would explain the difference between the desktop and the mobile device.

 

I would try to use the Round technique to begin with, because that would remove the dependency on formatting the value in a local specific way.

 

Anonymous
Not applicable

The problem is also present on my desktop version after doing this, while it isn't present when using Abs(). 

 

Anonymous
Not applicable

The round function also doesn't remove the issue. Do you perhaps know of any workaround to make powerapp recognize a comma symbol as a decimal seperator ? 

Anonymous
Not applicable

Changing my phone language to English did the job! Thank you for the insight.

 

View solution in original post

Pstork1
Dual Super User III
Dual Super User III

Using ',' instead of '.' as a decimal separator is dependent on the locale settings for SharePoint, Power Automate, and your phone.  If you are defaulting to English it won't use ',' as a decimal separator.  Your locale needs to be set for somewhere that uses ',' as a separator.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,266)