Trouble with affecting a text value in a new record
Ninox Profile


With two linked tables I cant affect the value of a text field of the parent table into a text field in a new record of the child table with the command

atcd := Patients.lastatcd

in  "déclencher sur un nouvel enregistrement"

It works with a button with the same code. It works with a defined text chain...

atcd := "blabla"

Thanks for your help



Ninox Profile

Can you give the complete code? Make sure the table relation is set when you try to set the value.


Ninox Profile

Hello Birger, The table relation is set ; the only line of code is

atcd := Patients.lastatcd




Ninox Profile

So Birger,

it seems that the procedure works in databases in teams/cloud, not in local databases opened with mac Appli...

It is a little disturbing.

Are there such known bugs in the mac appli ??

Thank you


Ninox Profile

@Marc...  Hmm.. this is interesting.. 

In another thread ..


I point out that the triggers fire out of order when running in pure cloud (not even mac app accessing a cloud database).  In the Mac app (regardless if it is a cloud hosted, local .. and not tested.. iCloud database)...  they fire as expected .. Create then Update.. 


What is happening is that when Child's Trigger On Create fires.. the Child's reference to the Parent has not been updated.  It then updates and the Trigger on Update fires.    To prove this theory,  I created a "TriggerAudit" table .. and populate a record each time the Create or Trigger after Update fires from either the Parent or the Child table.. 


Here is the basic trigger logic


Further... Once I had an idea of the trigger execution .. I updated the Child's Trigger on create like so.. 


And as I expected... The Parent reference is null;