Okay
  Public Ticket #3725013
Rounding to 5 Decimal places
Closed

Comments

  • Jay Ofori-Anum started the conversation

    Support have not responded since July - so Before I go with another product does anyone know the answer to this?

    Hi,

    Problem: The program is not preserving the numbers exactly as I typed them?

    I enter numbers like this into a cell - 1.07182

    Everytime I enter this number and save it changes to "0" and deletes the "2".

    So end up with 1.07180 - which is drastically incorrect (inaccurate) for further calculations.

    It is required because I will subtract 2 numbers manually using the Formula field like this,

    1.07680 - 1.07182 = 0.00498 

    then I need to multiply by 100000 = 498 

    OR

    1.07182 - 1.07680 = -0.00498

    then I need to multiply by 100000 = -498

    I need to solve this because this type of calculation is used more than once in a table.

    I've tried modifying the Decimal places both in the Settings and the individual fields - that makes the number look worse :-) less accurate.


    Also tried importing an Excel spread sheet and again does not preserve the decimal placements or number seems to only calclaute to about 4 decimal places max.

    Kindest regards Jay

  •  1,846
    Miloš replied

    Hi Jay,

    As mentioned on the original ticket, our sincerest apologies, there was an issue with the ticket system, we will do our best to ensure it does not happen again.

    In regards to the issue you described, we are unable to reproduce it - you can download our Video here to see how floats like this can be edited if we configure all the details correctly.

    We responded to Jay in more details on the private ticket, but just in case if any other user comes up on this issue - We will share what must be checked/configured to make sure this kind of float number can be properly edited, etc.

    - Make sure to set the matching number format you need in the Main Plugin settings :

    In this case, we use the US format ( comma for thousands, dot for decimal separator )

    3360695985.png

    The number format must be set before we create the Manual Table, otherwise it will create the SQL table with wrong float format in the Database - then we need to make a new one.

    - When we choose the column type for Floats with 5 decimals, make sure to set the "Type value" to be "16,5", that creates the column in the database with 5 decimals.

    8986148084.png

    If this is configured, then there should be no issue, as can be seen per my Video and this screenshot, if we type in 1.07182, it gets properly saved in the cell value.

    3347060565.png
    6557999554.png

    Now, this is just a sample screenshot of how Jay's table looks in the database - as you can see, all the Float columns are saved with 4 decimals - that is the root of this issue.

    2017038321.png

    Now, you can either try to modify each Float column here in the database and set the "Length/Values" property, change it from 16,4 to 16,5 - then it should read it in our Plugin as 5 decimals and it should allow the editing as you need it.

    7879770921.png

    We just advise caution when changing column type in the DB - it is best if you can first make a duplicate in our Plugin from the Manual table before doing this, for safety.

    Other than that, if you were to make a new Table - or a new Float column, as per my Video and screenshots, if you set it to be stored with 5 decimals and the correct number Format - this issue should be resolved.

    We will proceed in more detail on the original, private ticket, and just going to leave this here, in case if any other user has the same issue, since it is a public ticket.

    Thank you,

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables