Print this Page
1.6 Architect
14. Function Add
Close this Page

1.6.14. Add Function:
This is a data entry form with columns, topics and fields.   See the popup function fro more details regarding newpaper columns and topics.

Functional Access Control:
The web pages that are provided to people who may view data but may not create data are unique and do not contain a link to any add function.
When the add web page is shown, the new record has already been created with details of the author and default values for each and every field - data never needs to be saved.   The act of entering data in each field is actually the same as changing field values - after each value is entered, it is automatically replaced in the database after a back up copy fo the original value is saved.   It is not possible to forget to save any data - it has already been saved.

 
4GL Add Function:
FORM and INSERT declars the record code and "*" in the label declares that all fields are to be inserted from the default record key defined in logical records.   "DEFAULT" is an alternative label where more than one default record exists for each site - the site specific default record is cloned to add the new data.
MENU and INCLUDE or an in-line set of menu options from START to END will be provided - see details in change function.
BODY and START will begin the body as one or more columns.
BODY and COLUMN will define each column with the column number in the Field and column percentage width in the Width - 0 means whatever width is remaining.
FORM and START will begin a form topic.
FORM with any edit code will identify a specific record and field number.
FORM and END will end a form topic.
BODY and END will end the body.
EXIT and CONTENT will show the copyright bar according to configuration details.

4GL Form Edits:
FORM and TEXT will define a normal text date entry field according to its record code, field number and maximum width.   The Label is shown to the left and the Title is an optional popup tooltip. The Link is not used as "-".
FORM and TEXT-NAM is a text field for peoples names that are capitalized without numbers.
FORM and TEXT-CAP is a text field for company names that are capitalized with optional numbers.
FORM and TEXT-EMA is a text field for email address validation.
FORM and TEXT-PHO is a text field for telephone number validation.
FORM and TEXT-UPP is a text field with upper case conversion.
FORM and TEXTREAD is a read-only text field that cannot be changed.
FORM and LIST is a drop down encoded list for selection using the Link as option data name.
FORM and LISTREAD is a read-only list decoded field that cannot be changed.
FORM and AREA is a text area with many "rr" rows and "cc" columns defined in the Link field as "rrcc".

4GL Form Identity:
FORM and IDEN0103 will show readonly 01 primary key and 03 as site code.
FORM and ID040506 will show readonly 03, 04 and 05 keys.
FORM and ID070809 will show readonly 06, 07 and 08 keys.
FORM and ID171819 will show readonly last changed date, time and user.
FORM and ID202122 will show readonly created date, time and user.

4GL Form Condition:
FORM and IF will check the key word in the Label using the condition in the Title for the value in the Link.   "ROLE3" means the 3rd character of the user role that may be "M" for manager or "U" for user.
FORM and ELSE will end the IF condition and begin the ELSE condition.
FORM and ENDIF will end the IF and ELSE condition.

4GL Form Left and Right:
More than one field may be shown in the same row using LEFT and RIGHT directives.
FORM and LEFT will begin a row with fields to the left.
FORM and RIGHT will switch a row with fields from the left to the right.
FORM and NORMAL will end left and right positioning.