Table Setup

Note For simplicity, we use "table" in the following description to refer to any of database object in the project. A database object can be either a table or a view.

After loading the database, the tables will be shown in the database pane on the left pane. To access settings for a particular table, click the table node of any table in the database pane and then click the [Table] tab to go to the Table Setup page. This is the setup page for a single table.

screen shot

You can also click on the [Tables] or [Views] node in the database pane to go to the Tables Setup page which is a grid showing the most frequently used settings for all tables. If you need to set these settings for multiple tables, this page allow you to view and set them quickly.

screen shot


Notes
  1. For all checkbox or combobox columns, if you want to apply the setting to ALL tables or views, you can choose your setting at the [Tables] or [Views] row.
  2. View functionality works at field level and can be setup for each field in the Field Level Setup page. Please refer to the Field Setup for details.

If you prefer to view the tables in alphabetical order, click [Tools] -> [Sort Tables Alphabetically] (see Tools).

You can still change the display order of the menu item by drag-and-drop. Select a table by clicking the first column - [Table/View Name] column, then drag and drop to where you want. Note that a table cannot be moved out of its parent node.

Note that changing the display order of table in this Table Setup page does not change the display order of the tables in the menu. To change the display order of the menu item, click [Tools] -> [Menu Editor] (see Tools).

 

The available table level settings are as follows:

General

Name Table name
Generate Select/unselect the table for generation
Caption

Caption of the table.

Note If you use Multi-Language (see Config Settings), use Multi-Language Property Editor, see Tools for details.
Filter

Specify a filter (WHERE clause) for the table. Click the [...] button in [Filter] column, the Filter Editor will popup. Enter your filter, you can drag the field names from the left pane to the editor, the SQL identifier quote characters will also be added for you automatically.

Notes

  1. If not Remote data (see Config Settings), this filter must be fixed so it can be applied during generation (NOT during runtime),
  2. The filter must be a valid WHERE clause (without the "WHERE" keyword).
Sort

Specify the default sort fields (ORDER BY clause) for the table. Click the [...] button in [Sort] column, the following dialog box will popup. You can choose up to 6 fields, in either ascending or descending order.

Default Set a Table as the Default Table. The Default table is the first table the user see when opening the app. Select the table you want in the [Default] column.

 

List Page

Title field

Specifies the Title field. The field value should be a short description of the item, e.g. product name.

Note This field must be selected to show in the List page, see Field Setup.
Thumbnail field

Specifies the Thumbnail field. The field value should be an image file name (without file path) to be used as thumbnail for the item.

Note This field must be selected to show in the List page, see Field Setup.

Notes

  1. By default thumbnails in List page are 80 x 80 px square images, if you want other sizes, you can change by Advanced Settings. If the provided images are larger, they will be resized.
  2. If the provided images are not square, they will be cropped.
  3. If you prefer to use circular images, enable Use avatar (see below).
  4. The original images should be placed in the File Folder specified under [Config] -> [General] tab. See Config Settings.
Use avatar Use the avatar effect for thumbnail
Thumbnail on right Put the thumbnails on right side
Search Specifies whether the page allows searching
Note All fields selected for the List or View page can be searched. However, note that lookup fields only support searching the real field value, NOT the display values.
Infinite scroll For remote data only. Enable InfiniteScroll which will load more records when the user scrolls a specified distance from the bottom or top of the page. The default page size is 30, you can adjust it using the advanced setting Infinite scroll page size.

 

View Page

View If enabled, a View page for the table will be generated (for displaying a record). Default is enabled.
Thumbnail field

Specifies the Thumbnail field. The field value should be an image file name (without file path) to be used as thumbnail for the item.

Note This field must be selected to show in the View page, see Field Setup.

Notes

  1. By default thumbnails in View page are of original sizes with max-width 100%, if you want other sizes, you can change by Advanced Settings. If the provided images are larger, they will be resized.
  2. The original images should be placed in the File Folder specified under [Config] -> [General] tab. See Config Settings.

 

Master/Detail

You can establish master/detail (one-to-many) relationship between two tables as follows

  1. Select a table in the table grid,
  2. Then in [Master/Detail] panel at the bottom right corner of the page, click [Modify...] to bring up the visual master/detail relationship editor.
  3. Click [Add table] to add the master and detail table to the diagram.
  4. Create a relationship between them by dragging from the master field (key field in master table) to the detail field (foreign key field in the detail table). If there are more linked field, repeat the step until all the relationships are setup.

If you want to remove a relationship, select the link in the diagram and click [Delete]. After setup, click [OK] to confirm.

Note The diagram only shows master/detail relationships of the selected table. Although you can setup relationships for other tables in the diagram and view them in the [Master/Detail] panel immediately after clicking [OK], the relationships for other tables will not be loaded again if you go to other table and then come back to this table. Instead, the relationships will only be displayed when you change to the related tables.

In most cases, master and detail tables are joined by one field, you have one link between the master/detail table and you have one row in the Master/Detail panel only.

 


 ©2018 e.World Technology Limited. All rights reserved.