Page 2 of 2

Re: Subform not saving new record

Posted: Mon Mar 19, 2018 10:55 pm
by tonyd
none. Does that mean the form's object list is not used to create the query?

Re: Subform not saving new record

Posted: Tue Mar 20, 2018 7:33 am
by toms
tonyd wrote:none. Does that mean the form's object list is not used to create the query?
Not sure about that. I haven't examined the saving part of the source code thoroughly.
Another thing to check: Search the Objects Form for duplicates of mattersid.

Re: Subform not saving new record

Posted: Tue Mar 20, 2018 10:52 am
by tonyd
FIxed! :D

I found out you cannot include the foreign key field in a subform that uses an Input:file object because the system already takes care of updating that field. By including the foreign key in the browse subform, I was creating the duplicate SQL field. FYI, nuBuilder creates the SQL statement in nuUpdateDatabase() at line 201 of nudata.php. Here the system has already taken care of the record ID and the foreign key of the subform, then it finishes building the SQL statement for the update. If you include the foreign key in your browse subform, it will create it twice. For some strange reason the system does not do this for subforms that do not have an Input:file object.

Re: Subform not saving new record

Posted: Wed Mar 21, 2018 10:20 pm
by admin
.