Previous Topic

Next Topic

Book Contents

Book Index

Table Designer

Navigator > Setup > Table Designer > Table Designer > Fields tab

You will be prompted to take a backup of your data before running the Table Designer. We recommend taking a backup before modifying any tables.

Use MaxBasic, Data Interchange and Form Designer to add and maintain Custom tables (.adb files), and index keys (.anx files). Files are registered and saved in the Company data folder. Data can be entered directly in Custom Tables from Table Editor. A Maintenance grid can be added to the Navigator using a Script Shortcut.

Note: We recommend custom table names contain only alphanumeric characters and underscores. If a custom table name has any of the following characters or contains spaces that table will not be included in the metadata for the Web Service -''#@$^!%&(),;.[]{}`~+=

For Custom Tables to work correctly in the Web Service there must be a single field that uniquely defines each row. That field should be indexed, and the index key should only include that field and be flagged Unique and Primary.

Use custom fields and index keys to extend Accredo tables (.pdb files) and indexes (.pnx files).

Custom fields added to an Accredo table will appear on a Custom tab, and can be customised into grids and report layouts. See also Extend Accredo Tables.

Warning: Adding and removing custom tables can affect other Accredo tables. Please consider the impact when using Table Designer, and use with caution. If you are unsure, contact Accredo Support.

Toolbar

ToolbarExpand

Expand Toolbar (Ctrl+F9)

Expand the toolbar to give access to all toolbar options. Press Esc to close the expanded toolbar.

TableEdit

Edit (F11)

Edit the Table.

TableInsert

New Table (F4)

Create a new table.

UpgradeTable

Upgrade... (Alt+U)

Active if the table is saved and is not an XML file. Prompts you to select an XML template. The table will be restructured to match the XML schema in the file.

See also Upgrade Tables Using Templates.

Note: Any fields that are not included the XML schema file, and have not been renamed to match new Custom fields added in the schema will be dropped, and data in these fields will be lost. This also applies to custom indexes, as only indexes in the XML schema will be retained. A warning will be shown if data will be lost from the source table.

Document (Alt+D)

Active if the table is saved, shows the object documentation.

Print Fields (Ctrl+P)

Print the fields shown in the grid.

Fields Tab

No.

The ID number of the field, and the field's position on the table.

Name

The name of the field in the table. May be entered with spaces, these will be stripped for the field name and retained for the default display label.

Type

The type of data stored in the field affects the disk storage each field occupies. See Table Field Types for field types available.

Domain

Select from

  • An existing Domain for pre-defined field size and type, when the field is an existing field type.
  • Custom Domain to define the field size for String fields, when the field does not meet an existing field type.
  • Custom U Domain to define the field size for UString fields, when the field does not meet an existing field type.
  • A new Domain when the field is a new Lookup or ID (autoinc) field.

If an existing Domain (excluding Custom and Custom U) is selected, the Type, Size and Upper fields use the existing data (read-only). The field and the data have the usual Accredo rules. For example, GL Account codes must be formatted ####.###. The following Domain types are dependent on Company settings,

  • Amount
  • Discount
  • Rounding
  • Quantity

If the Custom Domain is selected, the Size and Upper fields can be specified.

To add a new Domain for a new Lookup field, a unique domain name called Z_{tablename} is required. The unique domain name will not be in the drop down list, so must be keyed in, domain names are limited to a maximum of 40 characters. When the table is saved, the table must be saved as {tablename.adb}. The Lookup field must be Selected when a new Domain is entered.

A Domain is required when a field in a custom table will be used as a Lookup field in other tables. A Domain is required for all fields with type String.

FX Code Field

FX Domain fields require an associated CO Currency Code Domain field in the table.

Add one or more fields with domain CO Currency Code before adding FX Fields. The CO Currency Code fields will populate the FX Code Field.

Select an FX Code Field from the list of CO Currency Code fields.

Size

You can set the maximum number of characters allowed in String and Variant Type fields. The maximum field size is based on the number of characters, 1 character = 1 byte.

Lookup

Selected, creates a lookup domain for the field that can be added to another table. Lookup fields must have a Custom Domain name, in the form Z_{name} and must be type String.

Clear, (default).

Description

Selected, the field becomes the description for the lookup domain. Tables with Lookup fields must have a Lookup Description selected. Only one Lookup Description can be selected per table.

Clear, (default).

Heat

Heat is used to indicate how frequently a field is updated. Fields with a heat level of 1 are the "coldest" i.e. never change, with heat progressing upward with frequency of change to a maximum of 9 for the hottest field, the RecordRevision, which ticks up for every modification. Fields within a record are sorted in their heat order and only the portion of the record at the minimum heat field being changed and above is written. This allows Accredo to minimise write sizes. For example, a Created Date or ID field would have heat number 1, as it is written only once when a record is created.

Heat is only editable for custom domain fields and fields in custom tables. Defaults to 2.

Required

Selected, a field value is required before saving.

Clear, a record can be saved if the field is empty.

Left Pad

String fields are right padded to the maximum length to allow for left padding. Pads strings with space characters to the maximum size specified by adding spaces to the left of the string.

Upper

Selected, entered text will be upper case (usually for codes).

Encrypt

Selected for all String fields and can not be changed.
All String fields in Accredo are encrypted at rest.

Custom Field

Selected, indicates the field is a custom field.

Grid Toolbar

ToolbarExpand

Expand Toolbar (Ctrl+F9)

Expand the toolbar to give access to all toolbar options. Press Esc to close the expanded toolbar.

Zoom (Ctrl+F12)

Open Table Designer Field in Form view to add, delete, edit and scroll. Move off the field to save changes, they will appear on CLOSE.

Insert (F4)

Insert a new field at the selected line.

Note: Table field and key schemas have a limit of size 65535. If a table schema exceeds this it cannot be saved. Tables exceeding this limit are not ideally designed, and should be redesigned.

Move (Shift+Up) (Shift+Down)

Select a field and reorder the list.

Delete (F3)

Delete the selected field.

RecordTracking

Add Tracking Fields

Inserts tracking fields:

  • Created User Code, The user who created the record.
  • Created Time Stamp, The date time the record was created.
  • Modified User Code, The user who last modified the record.
  • Modified Time Stamp, The date time the record was last modified.

Calculated Created Date, Created Time, Modified Date and Modified Time fields are automatically created for the table from the Time Stamps.

Timestamps are stored in UTC and returned/displayed in Local Time.

The Created and Modified fields are automatically populated when a record is inserted in the table.

The Modified fields can be updated by calling the StampModified method when a record is edited. When changes are made to fields in a grid, the Modified fields are updated.

RecordTrackingRefresh

Change Tracking Fields

Replaces Created Date, Created Time fields with Created Time Stamp, and Modified Date, Modified Time fields with Modified Time Stamp. Data is automatically mapped to the new fields on save. Calculated Created Date, Created Time, Modified Date and Modified Time fields are automatically created for the table for backward compatibility.

Add Record Revision

Inserts the Record Revision field, showing the integer number of times the record has been revised.

Buttons

Load... (Alt+L)

Loads an existing Custom adb or Accredo pdb table, or a table schema xml or Memory Table definition pfm, to use or edit.

Note: You can only load tables from the current Company data directory. Tables from other companies may have different data structures to your company, so loading tables from them could cause problems.

Save... (Ctrl+S)

Saves the table, you can add data via DI, load to select or edit. You can only save tables to the current Company data directory. Other companies may have different data structures to your company, so saving tables between companies could cause problems.

If the table is locked by another user, you will be prompted to save the changes to an XML file, which can be applied to the table when it is not locked.

Cancel (Esc)

Cancel all changes.

In This Section

TD Table Designer - Keys tab

Table Field Types

Table Editor

Table Register

Table Designer - Reports

Rebuild Custom Data Dictionary

Extend Accredo Tables