0

Duplicating a database deletes internal references

I have duplicated a Database in order to start populating it with data from scratch.

One of the tables ('Selezioni') exists only to allow the creation of Cascading Dynamic Choice Fields.

When I duplicate the database, all the references to that table get lost as if Ninox couldn't find the table. Of course I haven't changed any table's name.

In the dynamic value field I get 

let xTipo := number(YA);
let xArea := number(T8);
let xLiv := number(V8);
ERR("Tabella non trovata: BB")[A = 4 and H = xTipo and B = xArea and C = xLiv]

where there should be

let xTipo := number(Contratto);
let xArea := number(Area);
let xLiv := number(Livello);
(select Selezioni)[ContrattoCategorie = 4 and ContrattoTipo = xTipo and ContrattoArea = xArea and ContrattoLivello = xLiv]

This brings me to my second question: if I want to duplicate a database, how can I know which references will stay and which ones will be lost?

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Fred
    • Fred
    • 5 mths ago
    • Reported - view

    Interesting, I duplicated a DB with dynamic fields and they duplicated fine. They didn’t lose their connection or anything.

    Can you create a temp db and try it again?

    Like
      • Gianluca
      • Gianluca
      • 5 mths ago
      • Reported - view

      Fred Forget it, my mistake. I said I duplicated it, but actually haven't.

      If I duplicate it, all is in the right place, but of course all the fields are still populated.

      Instead I created a new database and Imported all the tables from the other one, with data and files only for the support tables (like 'Selezioni'): this is the scenario where dynamic choice fields in the cascading selection fail to correctly keep the references.

      Like
    • Fred
    • Fred
    • 5 mths ago
    • Reported - view

    You can always not duplicate the records. Then just import the data for the dynamic choice field separately.

    Like
      • Gianluca
      • Gianluca
      • 5 mths ago
      • Reported - view

      Fred thank you. Now that you name it, I've seen how. I just was doing it all too "easily" and hadn't pay enough attention to some of the options.

      Anyway be ready, you're not free from me yet....I'll be coming soon with a "scripting" question that annoys me a lot 🤣.

      Like 1
Like Follow
  • Status Answered
  • 5 mths agoLast active
  • 4Replies
  • 47Views
  • 2 Following