SharePoint "Number" field with number of decimals = Zero. will still show the number with decimals inside the API

john john Pter 115 Reputation points
2024-07-22T20:17:27.7166667+00:00

I have this Column of type number and number of decimal = Zero:-

 

thumbnail image 1 of blog post titled  SharePoint "Number" field with number of decimals = Zero. will still show the number with decimals

 

 

now using the SharePoint UI or using Power Apps, if I enter a number with decimals (6.5 for example) seems inside the SharePoint UI the number will get rounded (to 7), as follow:-

 

thumbnail image 2 of blog post titled  SharePoint "Number" field with number of decimals = Zero. will still show the number with decimals

 

 

but inside Power Apps or SharePoint API (such as GetItems action inside power automate) will still show the original number with decimals (6.5), as follow:-

 

thumbnail image 3 of blog post titled  SharePoint "Number" field with number of decimals = Zero. will still show the number with decimals

 

 

any advice how this work in sharepoint?

Second question, in general if i change the "number of decimal places" list inside the column type, from Zero to Automatic will this cause any data lose? i do not think so? Now, if i do so at least the SharePoint UI will be compatible with the API, Power Apps and Power Automate.

Thanks in advance for any help.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,264 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 44,146 Reputation points Microsoft Vendor
    2024-07-23T03:40:56.34+00:00

    1.In the SharePoint modern UI, when you fill in 6.5 in the number column, the real date (store in the SharePoint cloud) is 6.5. Due to the setting number of decimal is equal to 0, SharePoint automatically rounding decimal points of the value in the number column, so it displays 7.

    But in the Power Apps, Power Automate and API, they get the real date in the number column, so the result displays 6.5.

    2.Per my test, change the "number of decimal places" from 0 to Automatic will not cause the data lose. In the SharePoint modern UI, values in the number column returns 6.5.

    User's image

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments