Create/update child records
Posted: Wed Mar 05, 2014 3:57 pm
Hi
I had another thread in custom code about how to create/update child records in a subform.
Updating is no problem when the child record (foreign key = record-id) is already existing since the sql statement gets the right child record by inner join and FK in the sql statement on both the form and subform.
But if I fill the data field, when I want to create a new, not previosly existing child record on the subform Nubuilder crashes. I guess I need to add the FK from the parent to this child record at the same time somehow.
How to achieve this?
You have no examples of tables linked by foreign keys in a subform in the sample_b.sql example or the tutorial videos, only lookups of existing child records/tables (customers, products, invoice items).
My sql database uses FK constraints in the Inno-db structure.
BR, Tinka
I had another thread in custom code about how to create/update child records in a subform.
Updating is no problem when the child record (foreign key = record-id) is already existing since the sql statement gets the right child record by inner join and FK in the sql statement on both the form and subform.
But if I fill the data field, when I want to create a new, not previosly existing child record on the subform Nubuilder crashes. I guess I need to add the FK from the parent to this child record at the same time somehow.
How to achieve this?
You have no examples of tables linked by foreign keys in a subform in the sample_b.sql example or the tutorial videos, only lookups of existing child records/tables (customers, products, invoice items).
My sql database uses FK constraints in the Inno-db structure.
BR, Tinka