nuBuilderForte UserGuide
nuBuilderForte UserGuide
Page No.: 1
Introduction to nuBuilder Forte
Navigating nuBuilder
Home Page
Globeadmin Home
User Home
Run Procedure
Run Report
Setup
Access Levels
User
Forms
Objects
Files
Fast Form
Procedures
Reports
Fast Report
SQL
Format
Translation
Database
Update
Browse Form
Edit Form
Builders
Fast Form
Fast Report
SQL Builder
Format Builder
Translation Builder
Page No.: 2
Arrange Objects
Edit Object Properties
Edit These Objects.
Create an Invoice Docket
Build SQL
Create Fast Report
Edit Report
Add Action Buttons
Page No.: 3
Introduction to nuBuilder Forte
nuBuilder Forte is the 4th version of nuBuilder. It is web based, open source and is used for creating database
applications with SQL, PHP and Javascript. All code used to customise is stored in the database and backed up
nuBuilder can be used to create business applications that manage data from a mySQL or MariaDB database. From
maintaining simple customer records to building a full accounting system. This is done using Forms to search
and edit data and Reports to print data.
Navigating nuBuilder
nuBuilder Forte is easy to navigate. Each Form (or screen) is either a Browse Form or an Edit Form. When you first
log into nuBuilder you will see a Home Page (Edit Form) appear in front of you. This Form will have buttons that can
then take you to other Forms...
Page No.: 4
Home Page
Globeadmin Home
User Home
The User Home Button will take you to a Launch Form where Buttons are automatically placed when creating a
Browse / Edit Form using Fast Form.
Page No.: 5
Run Procedure
This Button gives Globeadmin access to the list of Procedures available.to run.
Run Report
This Button gives Globeadmin access to the list of Reports available to run.
Setup
Click the Setup Button on the Setup Tab of the Home Form to edit the following…
Time Zone
Language
Page No.: 6
Email Settings
● User Name
● Password
● Host
● From Address
● From Name
● Port
● Use SSL
● Use Authentication
Page No.: 7
Header
The Header is placed in the HTML5 header of nuBuilder Forte and can be used for adding...
● Javascript libraries
● Javascript functions
● Style Sheets
● CSS Styles
Eg.
<html>
<header>
<script>
//- Any function in this script tag will be available anytime within nuBuilder.
function nuHeaderTest(){
</script>
<script type="text/javascript"
src="https://www.gstatic.com/charts/loader.js"></script>
<style>
.nuActionButton { background : orange; //-- personalise your Action Buttons
</style>
<script>
Page No.: 8
Access Levels
Once you have created your required Forms, Reports and Procedures you will need to give users access to them.
Home
When you log in as a developer the first thing you see is the Home Page.
Each Access Level requires a Home Page, which will be its starting point for Users with this Access Level.
The code for the default User Home Page is nuuserhome (the same as User Home on the Setup Tab).
Code
Description
Page No.: 9
Forms
Click the checkbox to enable the following on this Form for this Access Level.
● Add
● Print
● Save
● Clone
● Delete
Page No.: 10
Reports
Procedures
Page No.: 11
User
Name
Email address
Language
Access Level
Login Name
Page No.: 12
Forms
Objects
Files
nuBuilder Forte has an Upload File facility and an Input:File Object is to allow simple things like photos, pictures or
logos. Because files are converted to JSON it's not practical to use this as a general method for storing bigger files
over 300 Kb. As the conversion process can take a while.
Upload File
Files are stored in nuBuilder Forte, in a JSON format that can be used in an HTML EMBED object...
{"file":"ZGF0YT...SlJVNUVya0pnZ2c9PQ==","name":"nu_icon.png","size":21598,"type":"image/png"}
Code
Description
Group
Page No.: 13
Fast Form
Procedures
Reports
Fast Report
SQL
Format
Translation
Database
It is a free software tool written in PHP, intended to handle the administration of MySQL over the Web.
Frequently used operations can be performed via the user interface, while you still have the ability to directly execute
any SQL statement.
Page No.: 14
Those operations are..
● managing databases
● tables
● columns
● relations
● indexes
● users
● permissions
Update
Whenever a new update is pulled from Github it includes a file called nubuilder4.sql
This is used by the Update Button on the Builders tab on the Home Page, to make any changes to the current
database.
The Update Button should be run each time files are pulled from Github or Sourceforge.
Page No.: 15
Browse Form
Clicking a button on the Home Page will generally take you to a Browse Form.
Page No.: 16
Edit Form
Adding or selecting a record from a Browse Form will take you to an Edit Form.
● Subform Options.
● Arrange Objects - Drag/ Drop and reorder Objects on the Edit Form.
● Form Properties - View/edit this Form’s properties.
● Form Object List - A Browse Form of all Objects on this Form.
● Open any custom help.
Page No.: 17
Builders
Fast Form
To create a Form that will allow for searching and editing records in a table, the easiest way is by creating a Fast
Form.
● orm
Create a BrowseEdit F
● Use an existing table or create a new table in the database.
● Add fields to the Browse Form
● Add Objects to the Edit Form
● Create a button to access the new Form.
Page No.: 18
After adding all Objects...
Creating this Browse / Edit Form with the Fast Form Builder will create the following…
A Browse Form
An Edit Form.
Page No.: 19
Fast Report
To create a Report that can list and total fields, the easiest way is to use a Fast Report.
1. Select Table Data. (This is a list of table, SQL and Procedures that can be used)
2. Select the field to order the report by.
Page No.: 20
Creating this Report with the Fast Report Builder will create the following Report.
Creating this Report with the Fast Report Builder will also create the following record in the Report Builder t hat can
be further customised .
Page No.: 21
SQL Builder
The SQL Builder can also be accessed via the SQL button next to any nuBuilder Forte Textarea Object requiring SQL.
Page No.: 22
Each table can be dragged by clicking on the table name.
● A Tablename.
● A field that will allow you to enter an alias for this table.
● A list of fields belonging to this table.
● A checkbox at the left of each field name allowing that field to be chosen.
● A checkbox at the top left allowing all fields to be chosen at once.
1. Click the first field as you hover over it and its name becomes red.
2. Unclick as you hover over a field on another table when its name becomes green.
When hovering over an orange line you will see its join type.
4. Clauses
Type
There are 4 types of clauses that can be added using the SQL Builder.
1. WHERE
2. GROUP BY
3. ORDER BY
4. HAVING
Field
Clause
Order
5. SQL - SQL Code Built from Graphical User Interface that can be manually edited.
To further edit this, double click on the field and you will open Ace Editor in a full screen.
Page No.: 23
Format Builder
The Format Builder will allow you to create custom formats for nuDate and nuNumber.
Building a nuDate
Entering a Date with the keyboard requires the user to enter the date in the exact format.
● yy - 17
● yyyy - 2017
● pp - am or pm
● dd - 21
● ddd - Tue
● dddd - Tuesday
● mm - 03
● mmm - Mar
● mmmm - March
● hh - 15
● nn - 20
● ss - 01
Page No.: 24
.. and some punctuation.
Building a nuNumber
1. 1000.
2. 1000,
3. 1,000.
4. 1.000,
● To the left of these choices is a nuScroll Object that will allow you to add a currency sign.
● To the right of these choices is a nuScroll Object that will allow you select the number of decimal places.
This prefix and suffix of the Format will be added when a punctuation type is selected.
Page No.: 25
Translation Builder
This allows you to make alternative phrases in other languages that can be used instead of nuBuilder Forte's English
(Australian) phrases.
Language
English
Translation
Page No.: 26
Customising nuBuilder Elements.
Forms
The first thing you will see after logging into nuBuilder Forte is a nuBuilder Launch Form containing Button Objects
that will take you to other Forms.
1. Browse - A selectable list of records from a database table used by Lookup Objects.
2. Edit - An area displaying editable fields from a record in a database table.
3. Browse and Edit - A Form to select and then edit a record in a database table.
4. Subform - An Edit Form that is repeated inside a Subform Object.
5. Launch - A Form not associated with a database table.
You can build a Form (and create a Button to Access that Form) the easy way using the Form Builder.
OR...
1. Clicking the Form Button on the Setup Tab of the Home Page.
2. Clicking the Add Button at the top of a Browse Form.
3. Filling out your new Form's properties (see below). We suggest you make your first Form a Browse
and Edit.
4. Clicking the Save Button at the top of its Edit Form.
5. You will need to add a Button to the Home Page so users can open it.
6. And then you'll want to add some Objects to your new Edit Form, for displaying and editing fields.
Page No.: 27
Form Type
Code
Description
Form description.
Table Name
Page No.: 28
Primary Key
Tabs
All Form types, apart from Browse Forms, require at least one Tab.
Tabs are arranged horizontally above the editable area of an Edit Form.
Tabs allow users to navigate (what seems like) different layers on the same Form.
Title
Tab Title
Order
Displayed order of the Tabs. - Every time the Form is saved these records this will be reordered and renumbered in
multiples of 10.
Help
Javascript that can run to help the user eg. window.open('www.help.com.') or nuMessage(['You must fill in','all
fields.']);
SQL
If you want any help building SQL, the SQL Button will direct you to nuBuilder's SQL Builder.
OR
Page No.: 29
used by Subform Objects to order records inside the Subform.
Columns
Title
Column Title
Display
Align
Format
Used for formatting dates and numbers - The Formatted part of results are not searchable. (Don't search for a $ if it's
not in the actual record.)
Width
Width of column
Order
Order of column. - Every time the Form is saved these records this will be reordered and renumbered in multiples of
10.
Row Height
Height in pixels
If '0' then all rows will be displayed, if a number fewer than the rows in the database, it will show the remaining rows
on a separate page
Redirect To
Redirects the choice made this a Browse Form to another Edit Form.
Page No.: 30
PHP Code
Javascript
To edit this, double click on the Textarea and you will open Ace Editor in a full screen.
Page No.: 31
Page No.: 32
Objects
Tab:All
Form Tab
Type
● Calc - A number field that recalculates after each change made on the current Edit Form.
● Display - A read only field that will display the first field of the first record from a SQL Select statement.
● HTML - A read only area that can be used to display html.
● Image - A read only area that will display an image.
● Input - Generally used for entering text, it can also be used for other HTML5 Input types, along with some
types exclusive to nuBuilder Forte.
● Lookup - A lookup allowing the selection of a value from another table.
● Run - Does 1 of 2 things.
1. Creates a Button to allow the user to run another Form, Report or Procedure.
2. Creates an iFrame on an Edit Form in which a Form, Report or Procedure is displayed.
● Select - Allows the selection of one or more values from a list.
● Subform - Can contain rows (Subform Forms) that relate to the Edit Form.
● Textarea - Allows for text with carriage returns.
● Word - A read only object that simply creates a phrase in Bold.
Label
Description of Object.
Page No.: 33
ID
Top
Value in pixels.
Left
Value in pixels.
Width
Value in pixels.
Height
Value in pixels.
Cloneable
Yes or No.
It would mean that the whole record is cloned but its invoice number is not.
Used by...
● Calc
● Input
● Lookup
● Select
● Textarea
Align
Used by...
● Calc
● Display
● Input
● Textarea
● Word
Validation
Used by...
● Input
● Lookup
● Select
● Textarea
Page No.: 34
Access
Tab:Run
● Create a Button that will open a Form, Report or Procedure in a new Breadcrumb.
● Display a Form, Report or Procedure, inside an iFrame on the Edit Form.
Run
Filter
A string that will be used like the Search field to filter Browse records.
Record ID
Entering a Record ID will make the record with the matching ID display in an Edit Form (skipping the Browse Form)
Method
Button will create a button that will take you to the Form, Report or Procedure.
iFrame will mash an iFrame into the existing Edit Form that will display the Form, Report or Procedure.
Page No.: 35
Tab:Display
SQL
A valid SQL query that will display the first field of the first record from its result.
If you want any help building SQL, the SQL Button will direct you to nuBuilder's SQL Builder.
Eg.
Page No.: 36
Tab:Select
Multiple
Choosing Yes will allow for more than 1 selection from a visible list. Choosing No will allow for only 1 selection from a
dropdown list.
SQL or List
1. SQL - A valid SQL query that returns 2 columns - If you want any help building SQL, the SQL Button
will direct you to nuBuilder's SQL Builder.
2. List - A list delimited by a | eg. 0|No|1|Yes
Page No.: 37
Tab:Lookup
A Lookup Object can find and display a record selected from another Browse Form.
Form
Code
Scroll through to choose the Field to display as the lookup able Code from the list of possible fields.
Description
Scroll through to choose the Field to display as the Description from the list of possible fields.
Width
After Browse
Javascript
Page No.: 38
Page No.: 39
Tab:Subform
With each having a Delete checkbox on it's right - that will delete that record if ticked when the main Edit Form is
saved. (if Deleteable)
Form
Select a previously created nuBuilder Form that will scroll inside this Subform.
Foreign Key
Scroll though to choose the Foreign Key from the list of possible fields.
A Foreign Key is a field that is used to link to another table's Primary Key.
If a Subform's Form has an Object with the same ID as the Subform's Foreign Key, Subform records cannot
be saved.
Page No.: 40
Addable
Select Yes or No
If Yes, there will always be a blank Form at the end of the scrolling list. So that a new record can be added.
Deletable
Select Yes or No
If Yes, each Form will have a Delete checkbox on it's right - that will delete that record if ticked, when the main Edit
Form is saved.
Type
OR
● A Grid where each Object is placed in order side by side, making the height of each Form shorter.
Tab:Image
The Image Object is an easy way to display a specific image stored in nuBuilder Files.
Image
Page No.: 41
Tab:Input
A nuBuilder Input allows for most HTML5 input types as well as 4 types just available in nuBulder Forte.
Each of these 4 Objects requires extra information and will display an extra Object when selected.
nuDate
nuDate is a nuBuilder Input field that will display a calendar as it receives focus and will format data entry or calendar
selection, once edited.
nuAutoNumber
nuAutoNumber is a read-only nuBuilder Input field that will be populated once the Edit Form it is on, is saved for the
first time.
It requires Next Number - The number this Autonumber will start from.
nuNumber
nuNumber is a nuBuilder Input field that will format data entry once edited.
nuScroll
nuScroll is a nuBuilder Input field that will allow the user to scroll through a list using keyboard up and down arrows
but also allows for adding text, not in the list.
File
Page No.: 42
This is an HTML Object used for selecting a file to upload.
This file is stored in a JSON string and can be used for embedding files inside a div on an Edit Form using
nuEmbedObject().
● Button
● Checkbox
● Color
● Datetime-Local
● Email
● Hidden
● Image
● Month
● Number
● Password
● Radio
● Range
● Reset
● Search
● Telephone
● Text
● Time
● URL
● Week
a nuBuilder File Object converts a selected file to a JSON string (this is not an efficient way to handle files over
300kB).
This string can easily be used with HTML5 objects like <EMBED>.
Page No.: 43
Tab:HTML
This Object can be used for displaying custom HTML or a Google Chart.
Chart
Chart Type
● Pie Graph
● Line Graph
● Bar Graph
● Bar Graph - Stacked
● Bar Graph - Horizontal
● Bar Graph - Horizontal and Stacked
Javascript Array
[
['Month', 'Shane', 'Dave', 'Adam', 'Paul', 'Chris'],
['2004', 100, 200, 300, 400, 500],
['2005', 165, 238, 322, 498, 550],
['2006', 165, 938, 522, 998, 450],
['2007', 135, 1120, 599, 1268, 288]
];
nuSubformObject('items').chartData
Page No.: 44
Title
Vertical Label
Horizontal Label
HTML
HTML
It can also contain Hash Cookies and can be used to change the HTML before it is run.
Page No.: 45
Tab:Calc
A Calc Object is a numeric field that will be recalculated after any Object's onchange event.
Format
Formula
The Formula for this calculation is simply created by clicking a combination of Objects and Operators.
Objects is a list of available Input:Number, Input:nuNumber, nuCalc and Select Objects on the Edit Form.
Options containing a . refer to the Subform Name and the Input Name on that Subform. And will total up all values for
that Object eg. invoice_item_sf.ite_total
Options not containing a . refer to an Object on the Edit Form eg.inv_total
Page No.: 46
Tab:Custom Code
If an Object has a Javascript event, the Custom Code Tab will be in bold.
● beforeinsertrow
(Setting nuCancel = true; in this event, will stop a row being added to the Subform Object)
if(nuSubformRow == 9){
alert('Only 10 rows allowed');
}
nuCancel = true;
● afterinsertrow
● clickdelete
Page No.: 47
Javascript
Event
Javascript
To edit this, double click on the Textarea and you will open Ace Editor in full screen.
PHP can be run at different event points of a Form’s loading and saving.
Javascript can be used to automate certain user functions or simply change colors on a Form.
Here are the different points along nuBuilder’s Flow that can be customised…
Page No.: 48
Arranging Objects
Once Objects have been placed on an Edit Form they can be Adjusted with the Arrange Objects Form.
Page No.: 49
Reports
Code
Description
Group
Table
A Procedure will only appear in this list if #TABLE_ID# is found somewhere within it.
The point of using a Procedures is to create a temporary table that can be manipulated before it is used by the Report.
(If a nuTABLE or a nuSQL table is chosen, this temporary table is created automatically)
Page No.: 50
#TABLE_ID# simply gets replaced by the name of a temporary table, created by nuBuilder, that will be used by the
Report.
$s = "
SELECT
sta_last_name,
sta_initials,
sta_games,
sta_runs,
sta_captain,
CONCAT(sta_last_name, ',', sta_initials) AS full_name,
1 AS player
FROM
stats
";
Launch From
● The user defines the information to be stored in the table that will be used by the report.
● Run the Report from an Action Button at the top of the Form.
Report Designer
Page No.: 51
Arranging Objects
The nuBuilder Forte Report Designer will open up in a new browser window.
It is a graphical user interface, with drag and drop features, for designing a Report.
9 Functions
New Object
This will add a default Object into the Detail Section of the Report.
Clone Object
Doing this will clone any highlighted Objects.
Cloning an Object often saves more time than just adding an Object.
Select Objects
There are 3 ways to select one or more Objects.
1. Clicking on an Object. Holding the Ctrl Key down will allow you to add another Object to those already selected.
2. Drawing a rectangle around them with your mouse.
3. Clicking Select Objects on the Menu.
Adjust Object
This will bring up a dialog box with options that can adjust all selected Objects..
● Align To Left
● Align To Right
● Align To Top
● Align To Bottom
● Space Vertically
● Space Horizontally
● Thinnest
● Widest
● Tallest
Page No.: 52
● Shortest
Object Properties
● ID
● Object Type
● Field - Displays a value that comes from the reports Table.
● Label - Displays Text - these can use Hash Cookies.
● Image - Displays a PNG Image.
● Left
● Top
● Height
● Width
● Background Color
● Border Color
● Border Width
● Field Name/Title/Source - (Field/Label/Image)
● Field Name - A Scrollable list that displays a list of values that comes from the report's Table.
● Title - Text that can include Hash Cookies.
● Source - A Scrollable list that displays a list of values that comes from..
● Field - A Fieldname in the Table.
● Image - A list of nuBuilder Forte File.
● Label - A List with only 1 choice (that can be over written with an actual Label) which is used
to keep the Label to the exact size as its Height Property - KEEP EXACT HEIGHT.
● Font Color
● Font Family
● Font Size
● Font Weight
● Format
● Text Align
● Minimum Rows - In a growable Field Object.
● Maximum Rows - In a growable Field Object.
● Z Index - Objects with larger numbers will appear on top.
Group Properties
This will bring up a dialog box that will allow us to do 2 things.
1. Sort the records into a certain order before printing. - Sorting on up to 8 Scrollable fields.
2. Format each sections of the Report. - The properties for each Section are..
● Section Height - In pixels.
● Section Color - HTML.
● Section Page Break - Start a new page when completed.
● Yes.
● No.
Report Properties
This will bring up a dialog box with 2 options.
Page No.: 53
1. Paper
2. Orientation
Copy Changes
This will copy the design back to the Build Report Form and close the Report Designer.
These changes will NOT be saved until the current Build Report record is saved!
Functions
There are 2 functions that can be used within Group and Report Headers and Footers.
Page No.: 54
Procedures
Code
Description
Group
Launch From
Page No.: 55
This is only necessary if you need it to...
Run
PHP
This code can also use Hash Cookies that will help you customise nuBuilder.
To edit this, double click on the Textarea and you will open Ace Editor in full screen.
Page No.: 56
Hash Cookies
● A cookie helps hold values between Javascript and PHP.
● A nuBuilder cookie does a similar thing and has hashes around it eg. #USER_ID#.
In each of these situations, nuBuilder does a search and replace with all currently available Hash Cookies and any you use in your
code before it is run.
1. USER_ID
2. USER_GROUP_ID
3. HOME_ID
4. GLOBAL_ACCESS
5. ACCESS_LEVEL_CODE
To find what other Hash Cookies are available for use, you can run nuHash() inside your code.
PHP
Hash Cookies allow you to customise your PHP code.
nuRunQuery($s);
HTML
Hash Cookies allow you to customise your HTML Objects.
The Hash Cookies available to HTML Objects are the same as those available on Before Edit.
<iframe
width="560"
height="315"
src="#cus_youtube#"
frameborder="0" allowfullscreen>
Page No.: 57
</iframe>
Custom SQL
All Custom SQL used in nuBuilder Forte.
or
<source lang="sql">
</source>
SQL Builder
Any Clause in the Clauses Subform in the SQL Builder.
= '#RECORD_ID#'
Report Labels
Using Hash Cookies allows you to have changing titles on Report Labels.
</source>
The following are specific hash variables available only for Report Labels are...
● page
● pages
● description
● code
● year
● month
● day
● hour
● minute
● second
Page No.: 58
Creating an Invoicing Application
This simple application could be used to take phone orders for restaurants or retail stores etc.
1. Customer
2. Product
3. Invoice
4. Invoice items
This information will be entered by users through a nuBuilder Form (Invoice Form) that looks like this..
Page No.: 59
Create Forms and Tables
To create the required Forms and tables we will build 4 Fast Forms.
1.Customer
2.Product
Page No.: 60
3.Invoice
4.Invoice Item
Page No.: 61
Edit Form Properties
Forms created with Fast Forms will require the default Code and Description to something more descriptive.
1. Click the Options icon in the top left corner of a Form or Subform and select Form Properties..
Page No.: 62
Arrange Objects
A Fast Forms builds a Form and adds Objects. These Objects will need adjusting so they appear on an Edit Form in a
tidy logical order. A Fast Form may also create a Button to open the new Form, on the User Home Page (which will
also require adjusting) eg.
2. Click the Options icon in the top left corner of an Edit Form or Subform.
3. Highlight the Objects you want to adjust.
4. Click Save to apply these changes to that Form.
Page No.: 63
Edit Object Properties
Some objects created with a Fast Form have default values that will need editing.
Page No.: 64
Edit These Objects.
● inv_customer_id
$lu = nuLookupRecord();
nuSetFormValue('ite_unit_price', $lu->pro_sell);
Page No.: 65
Create an Invoice Docket
Next we create a delivery docket that Itemises the customer, product and pricing information that can be run from the
Invoice Edit Form.
Build SQL
SELECT
customer.*,
invoice.inv_number,
invoice.inv_date,
invoice.inv_total,
invoice.inv_tax,
invoice.inv_grand_total,
invoice_item.*,
product.pro_description
FROM
customer
JOIN invoice ON customer.customer_id = invoice.inv_customer_id
JOIN invoice_item ON invoice.invoice_id = invoice_item.ite_invoice_id
JOIN product ON product.product_id = invoice_item.ite_product_id
WHERE
((invoice.invoice_id = '#RECORD_ID#'))
Page No.: 66
Create Fast Report
Edit Report
Page No.: 67
Adjust Report Design from…
To…
To print this…
Page No.: 68
Add Action Buttons
We can add an Action Button to the Invoice Form that will Print the current docket.
● A Posted Button - This will set a flag (inv_posted) to 1. An invoice that is not posted will not see the Print
Button.
● The Print Button - .This will appear only when an invoice is posted.
if(nuFormType() == 'edit'){
if($('#inv_posted').val() == '1'){
nuAddActionButton('pinv', 'Print Docket', 'nuRunReport("INV")');
}else{
nuAddActionButton('ppost', 'Post Docket', '$("#inv_posted").val(1).change();nuSaveAction();');
}
Page No.: 69