0

Ninox Changes Pointers to Records ON ITS OWN!!!!!

This is a huge huge PROBLEM and has to be a BUG -- and I have now confirmed that it was reported at lease 8 Months ago ... and is still not solved.

I have a DB with thousands of records where the UI uses **dynamic Choice**.

I saved the DB in iCloud and imported it in another machine... and BANG... lots of records have the WRONG DATA that is coming from a Dynamic Choice.

Eg I have a database for expenses and have a category Dog Food.... and a  Major Category for that Pets.

After import Dog Food is now Cars as Major Category

This is not admissible.

As Reference here is the link I found after looking hours and hours for the Problem

https://forum.ninox.com/t/35ytj4k/data-in-the-orderitems-table-changes-on-its-own

7 replies

null
    • Fred
    • yesterday
    • Reported - view

    It is an old issue. Since then I have only used dynamic choice fields as UI fields and not to store data. I guess now that dynamic choice fields have the ability to use JSON, as long as you don't use recID then you will be OK.

    • Luis
    • yesterday
    • Reported - view

    Hi  Fred, thank you for the answer.

    Perhaps than you can help me, because (besides the disappointment I have basically lost many connections between records and now I have a huge mess)

    I was not using recID.... 

    I have an expense DB and each record has a field [Expense Category], which is a dynamic Choice, pointing to a Table "Categories"  -  the code is

    (select Categories)[Active = 1] order by 'Category Name'
    

    Here is how it looks (an example)

     

    Now what happened is that for a very large number of expenses, the "Expense Category" was changed

    That is, this expense, as an example, was then linked to [Car Expenses].

     

    What is then the alternative you suggest please?

    Hoes does JOSN helps me here? (sorry for the ignorance)

     

    Luis

    • Fred
    • yesterday
    • Reported - view
     said:
    Perhaps than you can help me, because (besides the disappointment I have basically lost many connections between records and now I have a huge mess)
    I was not using recID.... 

    If you are using a dynamic choice then you are using record Id, that is where the problem lies when the table gets defragmented on import.

    Now this problem only happens if the root table has lots of deletions. If moving forward your Categories table will be stable then you will not have this issue.

    To use JSON, your dynamic choice formula could look something like:

    let xCat := sort((select Categories where Active = 1).'Category Name');
    for cat in range(0,count(xCat)) do
        {
            id: cat+1,
            caption: item(xCat,i)
        }
    end

    Now the dynamic choice is not linked to a specific record Id. So as long as the returned Categories records are the same then you will not have to worry about. But once you add new ones or delete others then that will screw up the dynamic field.

    That is why I made the comment about using dynamic choice fields as only an UI element. Then put in the trigger after update code that updates a table or another field that stores the data you need.

      • Luis
      • yesterday
      • Reported - view

       

      got it! Many thanks for your patience Fred

      I have now for this case - and I have hundreds of expenses to correct- used a different approach:

      I used “relationship to” (and form as “drop box”) to create the same interaction.

      the side effect is that there is now in the [categories] table a “reverse link” table showing the assigned expenses… (but I have stuck it into a tab)

      From this perspective, the dynamic choice doesn’t bring me a lot of benefits as I can do the same with “relationships”

    • Fred
    • yesterday
    • Reported - view
     said:
    From this perspective, the dynamic choice doesn’t bring me a lot of benefits as I can do the same with “relationships”

    That is why I keep mentioning dynamic fields as a UI element. I'm guessing you are entering data directly in the tables. If you were to start using dashboards/pages to create data entry views then that is where dynamic choice fields come in handy.

    My DB is a personal DB, but I have slowly started to use data entry views instead of direct. It seemed like a lot of work to do, but it saves me from having to jump around tables to do things. I can also implement error checking (cause you can never trust the end user).

      • Luis
      • yesterday
      • Reported - view

       

      yes - in fact I have a form to enter data into the reference tables (Categories and the Major categories, which group the Categories) because like that as you said I am making sure mandatory fields are filled etc

      so - not really a lot of benefit now … EXCEPT for **multi selection** cases.

      sSorry but one last question: are you using a Ninox App or the “Ninox Cloud” (which requires subscription) - as I heard the latter doesn’t cause problems 

      (I was using the Mac personal app and  iCloud - can’t have subscriptions piling up the budget 😞

      • Fred
      • yesterday
      • Reported - view

      I have a public cloud subscription. I use both Mac and PC so that was the only way for me to work wherever I needed. It is my little splurge for myself.

       

       said:
      yes - in fact I have a form to enter data into the reference tables (Categories and the Major categories, which group the Categories) because like that as you said I am making sure mandatory fields are filled etc

       I'm not talking about enter data into the reference tables. I'm talking entering in all of my raw data. In fact, I would think your reference tables should be quite static.

Content aside

  • Status Answered
  • yesterdayLast active
  • 7Replies
  • 44Views
  • 2 Following