Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: How To (Forms, Reports, and more) > Forms > Form Designer

Add/Remove Tables

Scroll Prev Top Next More

The "Add/Remove Tables" menu allows users to add and remove tables from R:BASE forms. The dialog can be viewed by selecting "Tables" > "Add/Remove Tables" from the Form Designer main menu bar.

 

The main table associated with the form will be listed within the "Main Table" panel with a "Table Settings" button. A list of defined tables for the current connected database will be listed within the "Tables/Views" panel, that can be added to or removed from the current form. Tables added to an existing form are referred to as Slave Tables. A "Settings..." button is available for any selected slave table. Using the green up/down arrows, slave tables should be arranged for order of processing, which is significant. An example of a many-to-many relationship with four tables is: Slave1 links to Master. Slave2 links to Master, then Slave1. Slave3 links to Master, then Slave1, then Slave2.

 

The image next to a Main/Slave table name may have a defined Entry/Exit Procedure (EEP). If an EEP is defined for a table, the image will list small yellow pages on the left of the image. If there are no EEPs defined for the table, the image will be a blank page. The images allows developers to see if EEP code is present for any tables at a glance.

 

AddRemoveTable1

 

Table Relations

The Table Relations panel specifies the form logic, which is derived from the common data shared between the tables.

 

One to Many - specifies every slave table is linked to the master table. This table relationship specifies that Table 1 can contain only one row for any given row in Table 2, but Table 2 can contain many rows for any given row in Table 1. With a two-table form, this setting is the default.

Many to Many - specifies every slave table is linked to the master table and also to the other slave tables. With a two-table form, this table relationship specifies that Table 1 can contain many rows for any given row in Table 2, and vice versa. With more than two tables assigned to the form, this relationship can also mean that for any given row in Table 1, there are many rows in Table 2. And, for any given row in Table 3, there are many rows in Table 2. Usually, three tables are used in this relationship with two of the tables using a common column in relation to a third. These two tables do not link directly to each other; instead, each of these link to a third table in a One to Many relationship by a common key column with values that match. With more than two tables assigned to the form, this option is the appropriate setting.

 

See also:

 

Custom Table Relationships

 

Table Settings

When selecting the "Table Settings" button for the Main Table, or the "Settings..." button for a Slave Table, options are presented with settings within the "Row Settings" panel that provide control over how data can be added to or deleted from the table. Most forms are used for entering and editing data, so R:BASE assumes that you want to allow changes to the tables you add to your form. The default table settings allow all changes to the current table in your form. When changes are made to a row, the table is updated automatically as you move from row to row, or table to table, through the form. You can change these settings; for example, you can set a form to only add rows and not allow to delete or edit rows.

 

Add New Rows to the Table - determines if new rows can be added

Update Existing Rows - allows updating of existing rows

Automatic Update - determines if a "Save Changes" dialog will be displayed when moving out of the current row

Delete Rows - determines if rows can be deleted

Delete only from Current Table - determines if rows are only deleted from the current table or if from the current table and slave table(s) as well

 

AddRemoveTable2

 

Several table-level Entry/Exit Procedures are available to execute R:BASE code.

 

On Row Exit - once the row is exited, the specified EEP will run

After Saving Row - after saving the current row, the specified EEP will run

After Leaving Section - after switching tables, in a multi-table form, the specified EEP will run

Before Insert Row - before a row is inserted, the specified EEP will run

After Insert Row - after a row is inserted, the specified EEP will run

On Field Change - once the field value changes, the specified EEP will run

 

These EEPs provide the ability to run a procedure when table changes take place.

 

See also:

 

Form EEP Information

How to Define Form EEPs