BillingForm.png
I have a billing form (pictured above) that is not saving changes to the main charges/payments subform consistently on records like the one shown adding a payment and hitting the save button saves no problem but forms that have monthly charges dating back years that I have to scroll to the bottom of sometimes save but most are not saving. The nuDebug log states syntax error and the SQL is " UPDATE tblCurrentRentedUnits SET WHERE `BillingID` = '12193'; " for new subform rows that aren't saving. Shouldn't it be running an INSERT for the new record? Editing just the Notes or other main form fields I have had no problem saving on those records that fail on subform inserts.Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Subform not saving consistently
-
- Posts: 72
- Joined: Mon Jun 10, 2019 5:00 pm
- Has thanked: 6 times
- Been thanked: 4 times
Subform not saving consistently
I have a billing form (pictured above) that is not saving changes to the main charges/payments subform consistently on records like the one shown adding a payment and hitting the save button saves no problem but forms that have monthly charges dating back years that I have to scroll to the bottom of sometimes save but most are not saving. The nuDebug log states syntax error and the SQL is " UPDATE tblCurrentRentedUnits SET WHERE `BillingID` = '12193'; " for new subform rows that aren't saving. Shouldn't it be running an INSERT for the new record? Editing just the Notes or other main form fields I have had no problem saving on those records that fail on subform inserts.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 447 times
- Contact:
Re: Subform not saving consistently
Hi,
Are you using an auto increment primary key? This can lead to issues while saving and is not recommended.
Recommended Table Structure:
https://wiki.nubuilder.net/nubuilderv3/ ... _Structure
Naming conventions:
https://wiki.nubuilder.cloud/ ... onventions
More about this topic:
https://forums.nubuilder.cloud/viewtopic. ... it=varchar
Are you using an auto increment primary key? This can lead to issues while saving and is not recommended.
Recommended Table Structure:
https://wiki.nubuilder.net/nubuilderv3/ ... _Structure
Naming conventions:
https://wiki.nubuilder.cloud/ ... onventions
More about this topic:
https://forums.nubuilder.cloud/viewtopic. ... it=varchar
-
- Posts: 72
- Joined: Mon Jun 10, 2019 5:00 pm
- Has thanked: 6 times
- Been thanked: 4 times
Re: Subform not saving consistently
After testing with changing my primary and foreign keys for the main tables to varchar(25) and running a cascading update against them based on the https://forums.nubuilder.cloud/viewtopic. ... har#p17363 code and I'm still seeing the same thing happening i'm getting queries run when adding rows to the longer histories
that table is also the main table not the subform table it's called tblCharges_Payments
Code: Select all
UPDATE `entreprise` SET `entreprise_id2`= LEFT(MD5(UUID()),15)
Code: Select all
UPDATE tblCurrentRentedUnits SET WHERE `BillingID` = 'f4d2ec4cb9c0bf7';
that table is also the main table not the subform table it's called tblCharges_Payments
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 447 times
- Contact:
Re: Subform not saving consistently
Apart from seeing an error in nuDebug log, are changes still saved inconsistently?
Are you using the latest update?
Are you using the latest update?
-
- Posts: 72
- Joined: Mon Jun 10, 2019 5:00 pm
- Has thanked: 6 times
- Been thanked: 4 times
Re: Subform not saving consistently
I figured out why it's adding a debug error. Since it's only attempting to save for the subform there are no changes to the main form. I am using the latest release from sourceforge and it is not saving on subform inserts consistently.
-
- Posts: 72
- Joined: Mon Jun 10, 2019 5:00 pm
- Has thanked: 6 times
- Been thanked: 4 times
Re: Subform not saving consistently
Update I just saw https://forums.nubuilder.cloud/viewtopic.php?f=20&t=10015 Which sounds almost exactly like the problem I'm having however the version on the main sourceforge page under project activity isn't showing the update but I see it under files now so I will try tomorrow to run the update (I have to make sure I verify/reapply a change I made to output pdf's as files when run and my custom scripts folder) but I'll give it a shot.
-
- Posts: 72
- Joined: Mon Jun 10, 2019 5:00 pm
- Has thanked: 6 times
- Been thanked: 4 times
Re: Subform not saving consistently
Alright I just tried the new version both on my autonumber columns as well as resetting them to the hex UUIDs and they save if there are less than 25-30 rows for me.
-
- nuBuilder Team
- Posts: 506
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 8 times
- Been thanked: 18 times
Re: Subform not saving consistently
Hi,
With my specific subform I have it working up to 58 records. If I reduced the number of fields in the subform then I could add few more records.
You wrote it's OK up to about 30 records.
So the conclusion for me was - there is some limitation for total "data container"
and following this path I increased in the php.ini following variable:
max_input_vars 2000 (default is 1000)
and clould easilly go to more then 100 records
With my specific subform I have it working up to 58 records. If I reduced the number of fields in the subform then I could add few more records.
You wrote it's OK up to about 30 records.
So the conclusion for me was - there is some limitation for total "data container"
and following this path I increased in the php.ini following variable:
max_input_vars 2000 (default is 1000)
and clould easilly go to more then 100 records

If you like nuBuilder, please leave a review on SourceForge
-
- Posts: 72
- Joined: Mon Jun 10, 2019 5:00 pm
- Has thanked: 6 times
- Been thanked: 4 times
Re: Subform not saving consistently
I'm using php7.3 and have max_input_vars set to 1000000000 to try to eliminate any problem.
-
- Posts: 72
- Joined: Mon Jun 10, 2019 5:00 pm
- Has thanked: 6 times
- Been thanked: 4 times
Re: Subform not saving consistently
I just checked PHP 7.0 and 7.2 with MAMP and they both work so I'm rolling php on my server back to 7.2