0

Negative Round number make the APP CRASH!!!

I started using Ninox a few years ago. In some cases, I need to round with a negative value. For example, rounding the number 1,234,567.78 with (-2) should return 1,234,500.00. That’s how I used to do it in Excel, and it was also working perfectly in Ninox.

However, after the latest major update, many of my databases crashed. At first, I didn’t understand the reason, and it took me a long time to figure it out. I honestly thought I had lost everything. I tried to contact the Ninox team to downgrade the app, but that wasn’t possible. I submitted several support requests and update comments, but received no response.

After many days of troubleshooting, I managed to adjust the formula so that if the rounding value is less than 0, it defaults to 0. That temporarily solved the issue. But recently, I accidentally entered a negative rounding number again, and my database crashed once more. Now I can’t even open the app.

Does anyone know how to fix this issue or how to properly contact support to resolve this logic problem, so I can recover my database and continue my work?

5 replies

null
    • John_Halls
    • 3 days ago
    • Reported - view

    You are right! I've quickly put together a global function to address this. I've kept it line by line so you can see how it works

    function rnd(numberToRound : number,digits : number) do
        if digits >= 0 then
            round(numberToRound, digits)
        else
            let a := abs(digits);
            let b := pow(10, a);
            let c := numberToRound / b;
            let d := round(c, 0);
            let e := d * b;
            e
        end
    end
    

     Regards John

      • Mehdi_Kasiri
      • 3 days ago
      • Reported - view

       I understand that the problem can be solved with few lines. but i have a major question now: why it cant work with the same old logic????

      or at least there has to be some update and builtin code change to prevent such a crashes in the app and database.

      • red_kite
      • 3 days ago
      • Reported - view

       I have no answer of your question, but there is an different between german and english documentation.

      https://forum.ninox.de/t/83yhj55/round

      https://forum.ninox.com/t/p8yzw89/round

      german documentation says: no negativ digits.

      Es sind nur positive Zahlen als Parameter der Anzahl der Nachkommastellen, auf die gerundet werden soll, zulässig. 

       

      • Fred
      • 2 days ago
      • Reported - view

      That sounds like an important part that didn’t get translated. 

    • Mehdi_Kasiri
    • 3 days ago
    • Reported - view

    I was able to scape the crash screen using the "New Database.." through the main menu bar. after opening a new database, i just got a quick "Save archive as" of the original database to have a backup. then opened it again, and as it didn't by default go to the exact record which had the crash problem, then i was able to enter the "Edit Mode" and directly change the formula as bellow to eliminate the negative number and prevent the app from crashing.

    if 'Digit#' < 0 then
            round ("My Formula",0)
            else
            round("My Formula", 'Digit#')
    end

Content aside

  • 2 days agoLast active
  • 5Replies
  • 37Views
  • 4 Following