I've been following the pizza delivery tutorial in the NuBuilder wiki (https://wiki.nubuilder.cloud/ ... y_Tutorial) to learn how to use NuBuilder, but have been unable to define the invoice fast form.It objects to the Subform object with the error message "Invalid Field Name item_sf".
Leaving the subform field name blank gives error "The Field Names must be both unique and not blank"
Using the primary key invoice_id gives error "The Primary Key invoice_id must not be entered"
Whilst using the inv_number field name also gives error "The Field Names must be both unique and not blank"
The field name validation on the form builder screen is clearly not being suspended for subform objects (or have I missed something?)
The version.txt file holds the following
nuBuilder Forte 4.5
DB Version: V.4.5-2021.12.26.00
Files Version: V.4.5-2021.12.26.00
(V.MajorVersion-CurrentDate.BuildNumber)
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.
Cannot introduce a subform to a fast form
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Cannot introduce a subform to a fast form
Hi,
Could you upload a screenshot of the Fast Form filled in where we can see the issue? Thanks
Could you upload a screenshot of the Fast Form filled in where we can see the issue? Thanks
-
- Posts: 6
- Joined: Wed Jan 05, 2022 3:10 pm
Re: Cannot introduce a subform to a fast form
Not sure it gives you any better clue, but here goes


You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Cannot introduce a subform to a fast form
If you create a form for an existing table, you can't add field names that don't exist in the table.
Not being familiar with that tutorial, normally the item_sf column should have been added when the table was created.
Now all you can do is to manually add the item_sf column in the DB (using e.g. phpMyAdmin) or run this SQL:
Afterwards, you will probably have to log in to nuBuilder again.
Not being familiar with that tutorial, normally the item_sf column should have been added when the table was created.
Now all you can do is to manually add the item_sf column in the DB (using e.g. phpMyAdmin) or run this SQL:
Code: Select all
ALTER TABLE `invoice` ADD `item_sf` VARCHAR(25) NULL DEFAULT NULL AFTER `inv_gand_total`;
-
- Posts: 6
- Joined: Wed Jan 05, 2022 3:10 pm
Re: Cannot introduce a subform to a fast form
Surely this is a bug. Whilst adding an (unused) column to the table is a valid workaround it does not solve the issue permanently.
Having done some debugging and tracing I believe the fix is to modify the function nuFFInvalidColumns as defined whithin zzzzsys_form.sfo_javascript where zzzzsys_form_id = 'nufflaunch' as follows
This is offered in the hope of being helpful and of course requires verification/authorisation from the nuBuilder coders
Having done some debugging and tracing I believe the fix is to modify the function nuFFInvalidColumns as defined whithin zzzzsys_form.sfo_javascript where zzzzsys_form_id = 'nufflaunch' as follows
Code: Select all
function nuFFInvalidColumns() {
let msg ='';
let table = nuGetValue('fastform_table');
if (nuFORM.getTables().indexOf(table) == -1) return '';
let sf = nuSubformObject('obj_sf');
for (let i = 0; i < sf.rows.length; i++) {
/* start of Scrolin mod */
let rowtype=sf.rows[i][3];
if (rowtype=='nu59e44658a0c7724') { /* object type is Subform (see table zzzzsys_object) */
continue;
}
/* end of Scrolin mod */
let field = sf.rows[i][2];
let exists = nuFORM.tableSchema[table].names.indexOf(field);
if (sf.deleted[i] != 1 && exists == -1) {
msg += nuTranslate('Invalid Field Name') + ' <b>' + field + '</b>'
}
}
return msg;
}
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Cannot introduce a subform to a fast form
Thanks Scrolin, for your suggestion. The change must be carefully tested and possible use cases considered.
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact:
Re: Cannot introduce a subform to a fast form
Scrolin, I have now taken a closer look at it and modified nuFFInvalidColumns() so that fields / columns (such as 'Word', 'Subform', 'Image', 'HTML', 'Button') are permitted which do not exist in the table but whose values are not saved in the table either.
-
- Posts: 6
- Joined: Wed Jan 05, 2022 3:10 pm
Re: Cannot introduce a subform to a fast form
Thanks Kevin, is that in the current downloadable release yet?
-
- nuBuilder Team
- Posts: 4416
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 472 times
- Contact: