Working with Tables
Adding fields
(columns) to the table:
Moving a
table relative to other fields on the page
See also:
This document provides details of how to use Ebase Designer
to create and maintain a table. Tables can only be maintained using
the Graphical view tab (this is the default tab) within the Ebase Designer.
To add a new table, click the Add table icon
from
the toolbar or right-click on an existing field and select (Add à Table) from the pop-up menu
available. If the form already contains one or more tables, you will be asked
whether you want to create a new table or use an existing table. The existing
table option allows you to present the same table on multiple pages or even
many times on the same page. Each presentation can have differing presentation
properties, e.g. one may be display only, different columns can be shown etc,
however the underlying table data (i.e. the table cell values) remains the same
for all presentations.
If 'new table' is selected, the following dialog box is
displayed:

Resource: the resource to be used as a backing
resource for the table. This is not mandatory, but if selected the fetchtable
and updatetable FPL script commands are then available to
load and save table data. The dropdown list shows resources in the business
view associated with the form which are not being used by other tables.
Currently, only database resources can be a backing resource for a table.
A database table resource can only be used by one table in the form and
each table can have at most one database table resource associated with it.
(See Working with Databases for more
information)
Table Name: name of the new table (this is required)
Table Column Prefix: a unique prefix name which is
used to create field names for table columns. If you type in a Table Name, the
prefix automatically will be the same as the table name. The prefix can also be
changed independently of the Table Name. The significance of this prefix is
when columns are added to the table, the name of that column's field is
automatically prepended with the Table Columns' Prefix (and a separator
character). The default column header text, however, will be the name without
the prefix. If you reference any table column (such as in a script), it is the
field name that is used and this always includes its prefix. This is the reason
that this attribute is entitled Table Columns' Prefix in the dialogs.
Three ways are provided to add columns to the table under the
heading Select fields to copy and create as table columns:
These three methods can be used in combination.
To copy existing fields, click the Copy existing
fields button. A dialog box appears that will contain existing fields.
When the field is copied to the table, the name of the newly copied field will
begin with the table column prefix string.
To create a new field, click the Create new field
button. The table column prefix is always added as the first part of the new
field name.
To import fields from a resource, click the Import
fields from resource button, then select the required resource fields
from the pop-up dialog box. This will include the selected fields as columns
and also create mappings between the form field and the resource field. The
table column prefix will automatically be added as the first part of the new
field name.
After using the 3 buttons to copy/create/import fields, you
then have the option to select/deselect whichever fields you require from the
list. The Mapped to source column is provided for information and
provides a list of the resources to which the field is mapped. Notice that the
table column prefix string is always added as the first part of a field name.
IF THE TABLE COLUMN PREFIX IS CHANGED, ALL OF THE FIELDS
WITHIN THIS TABLE WILL BE RENAMED USING THE NEW PREFIX.
The new table appears in the graphical view as shown in the
example below:

A table can be repositioned on a page in the same way as for
other fields on the page. The table is moved by dragging the table title (
<no table title set> in the example above ). To move another field (or
table) after the table, drop the field onto the table title.
All operations on the entire table are performed by
right-clicking on the table title ( <no table title set> in the
example above ). This presents a pop-up menu as shown below:

Group presents a further dialog that allows the table
to be grouped with other fields or tables on the same page.
Ungroup removes the table from an existing group.
Delete deletes the entire table.
Table… (see below)
Add... presents the same dialog as for fields on a
page, allowing the insertion of additional fields after the table.
Insert part-page component allows the insertion of a
component after the table.
Hide Hidden Fields acts as a toggle switch to display
or hide all hidden fields on a page in the designer view.
Hide Unset Text acts as a toggle switch to display or
hide empty texts on a page in the designer view.
Edit Table
Properties (see below)
Edit
actions presents an additional dialog where the before and after table
event scripts can be specified.
Table... presents a further sub-menu:

Add
columns can be used to add additional columns to the table and presents a
dialog similar to the one described under add a table
to a page.
Validate
checks the validity of a table.
Set
resource can be used to change the backing resource for the table.
Set number of visible rows controls the number of rows presented to the user.
Show row
info controls whether or not the informational text showing number of
records is displayed
Selectable
directs the system to insert a Select checkbox column as the leftmost
column. This allows the user to select one or more columns.
Supports
Add Row directs the system to insert an Add Row button at the bottom
left of the displayed table. When clicked, this will insert a new blank row at
the bottom of the table.
Supports
Delete Row directs the system to insert a Delete checkbox column as
the rightmost column. This allows the user to delete one or more columns.
Create
External Resource can be used to create an external resource from this
table.
Edit table properties
presents a further dialog box:

Table Name
allows the name of the table to be changed. The table prefix may also change.
Table Columns' Prefix allows the prefix to be changed
independently of the Table Name.
WARNING: If the table column prefix is changed, all of the
fields within the table will be renamed.
Any scripts containing the old field names will have to be
changed to reflect the new field names.
Template
sheet provides the name of the template sheet within the presentation
template to use when presenting the table
Table
width specifies the total width to be occupied by the table as a
percentage. See controlling widths for more information.
No.
visible rows controls the number of rows presented to the user.
Table
supports adding rows directs the system to insert an Add Row button at the
bottom left of the displayed table. When clicked, this will insert a new blank
row at the bottom of the table.
Table
supports deleting rows directs the system to insert a Delete checkbox
column as the rightmost column. This allows the user to delete one or more
columns.
Table rows
are selectable directs the system to insert a Select checkbox column as the
leftmost column. This allows the user to select one or more columns.
Display number of records info directs the system to display the row numbers of the rows currently visible and the total number of rows in the table.
Display column headers directs the system to display column headers for the table. If display column headers checkbox is selected, the columns headers are displayed if:
1. The table contains data.
2. The table contains no data and Table supports adding rows checkbox is selected (see table properties above).
The Texts
tab can be used to set the table title, information, trailer and summary texts.
All operations on a table column are performed via the column
header text. To reposition a column relative to other columns, drag the
column header. To alter a column width relative to other columns, drag the
separator line on the right-hand side of the column header.
Right-clicking on the column header presents a pop-up menu:

Add columns can be used to add additional columns to
the table and presents a dialog similar to the one described under add a table to a page.
Add button column allows the addition of a column containing
a button.
Delete removes the table column from the table.
Move to.. allows the column to be moved to another
horizontal scroll view.
Fixed indicates that the column is always displayed
regardless of which horizontal view is displayed. Fixed columns are
automatically moved to the left hand side of the table and separated from
non-fixed columns by a thicker separator line.
Sortable
indicates that the column can be sorted by the user by clicking on sort icons
in the column header.
Mandatory
indicates that a value is required for all rows where the column is displayed.
Hidden
indicates the column is not displayed to the user.
Display
Only indicates that the user cannot enter or change information in the
column. (See controlling widths)
Immediate
Validation indicates that control should be passed immediately to the
server when a value is changed by the user.
Hyperlink
indicates that each column table cell will appear to the user as a hyperlink
(blue and underlined). When clicked, the system will run the on click event for
the table cell field.
Edit
column properties presents an additional dialog where all properties of the
form field can be changed.
Edit
actions presents an additional dialog where the field event scripts can be
specified.
Many column operations can be performed on multiple columns.
To do this, select multiple columns by holding down the SHIFT key (select a range)
or the CTRL key (individual selection) and clicking on the required column
headers, then right-click to present the multiple column pop-up menu.
Tables can be scrolled both vertically and horizontally.
Vertical scrolling is controlled by setting the number of lines to be displayed in the table properties. The system automatically inserts the scrolling control when scrollable data exists. The scrolling control is configured in the presentation template by clicking the Tables... button, then clicking the Table Scrolling button. A large number of options are available to configure the display of the scrolling control; a preview is provided within the configuration dialog.
Horizontal scrolling is controlled by creating a
number of horizontal scrolling views. On creation, a table consists of just one
horizontal view and additional horizontal views are created by moving columns
by right-clicking on the column header, selecting move to... and
selecting a page other than 1 from the dropdown list. The system automatically
inserts scrolling icons at the top right of the table to allow the user to
scroll through all available horizontal views. These icons are specified in the
presentation template associated with the form and can be changed if desired.
In Ebase Designer, the horizontal scrolling icons are also used to move between
views.
Columns marked as Fixed
are displayed in all horizontal views.
Tables are always left-aligned on the displayed page. The
right margin of the table can be controlled by setting the table width property (default 100%).
Within this total available width, the relative width of each table column can
be adjusted by dragging the right edge of each individual column header cell.
If a table column is editable (i.e. not display only) then
the length of the displayed entry field in each cell will take precedence over
the declared column width. For example, if a table column field is defined with
a display length of 60 but with a small column width, the display length will
be honoured and the column will appear much wider than expected. This can lead
to unexpected display problems, for example the need to scroll the browser
window horizontally to view all data and the horizontal scroll icon To overcome
this problem, reduce the display lengths for all editable column fields to be
equal to or smaller than the column width set in Ebase Designer. If necessary,
increase the maximum display length value so more data can be entered.
Display length and maximum display length can
be set on the presentation tab of column properties available from the
table column popup menu (right-click on column header).
All texts can be changed by double-clicking on the displayed
text. Additionally texts can be changed in multiple languages by clicking the
Maintain Language Texts Icon
from
the form toolbar.