Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Subform not saving new record

Questions related to using nuBuilder Forte.
tonyd
Posts: 68
Joined: Sun Mar 04, 2018 6:38 pm

Re: Subform not saving new record

Unread post by tonyd »

none. Does that mean the form's object list is not used to create the query?
TonyD
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Subform not saving new record

Unread post 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.
tonyd
Posts: 68
Joined: Sun Mar 04, 2018 6:38 pm

Re: Subform not saving new record

Unread post 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.
TonyD
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Subform not saving new record

Unread post by admin »

.
Post Reply