Page 1 of 1

Add Record Failure

Posted: Thu Jul 29, 2021 11:32 am
by vario
I have just upgraded my 4.5 database and a form which worked yesterday now fails to add new records. The processing is:

1) From browse form click "Add"
2) Upload a file using code adapted from https://github.com/smalos/nuBuilder4-Co ... d_file.php.
3) Click "Save" on the edit form.
4) In After Save code update the new record with a date taken from the uploaded data.
5) Show the uploaded data in a subform.

The problem being there is no row in the form table for the #RECORD_ID#, though the #RECORD_ID# is present in the subform data created during "After Save". I can find no errors in the browser console or the httpd error logs and if I query the form table in After Save there is no data for #RECORD_ID#.

As I say, all was working before the upgrade and no other forms are misbehaving as far I have been able to discern! The form table is only two columns - a primary key and a date.

Neil.

Re: Add Record Failure

Posted: Thu Jul 29, 2021 11:47 am
by kev1n
Hi Neil,

Could you try replacing

Code: Select all

if (!empty($F)) {
with

Code: Select all

if (true) {
in nudata.php, line L325

and see if saving works again?

Re: Add Record Failure

Posted: Thu Jul 29, 2021 11:52 am
by vario
Yes, that has worked and the new row is added correctly.