Previous Topic

Next Topic

Book Contents

Book Index

Memory Table Builder

Navigator > Setup > Memory Table Builder

You can use the Memory Table Builder to generate MaxBasic code that will build a memory table based on a file schema. Use the generated code in your scripts wherever you need to create the memory table.

Designing memory tables is a specialised task. For more information, contact your Accredo QSP.

Input Format

Select the format of the input file.

Note: If your file contains embedded line-feed characters within fields, as can occur in CSV files saved from MS Excel, you should select User Delimited with the default delimiter Chr(13) & Chr(10).

CSV/Tab Delimited CRLF Terminated

Comma separated value file or Tab delimited file, with lines terminated by Carriage Return Line Feed (CRLF) CHR(13) & CHR(10) characters.

Fields are optionally enclosed in quotation marks (" "), and are separated by commas or the Tab CHR(9) character. Record terminators do not consider quotes.

Select a Separator to specify CSV or Tab delimiter.

CSV/Tab Delimited LF Terminated

Comma separated value file or Tab delimited file, with lines terminated by a Line Feed (LF) CHR(10) character.

Fields are optionally enclosed in quotation marks (" "), and are separated by commas or the Tab CHR(9) character. Record terminators do not consider quotes.

Select a Separator to specify CSV or Tab delimiter.

CSV/Tab Delimited Any Terminator

Comma separated value file or Tab delimited file, with lines terminated by either Line Feed (LF) CHR(10), Carriage Return (CR) CHR(13) or Carriage Return Line Feed (CRLF) CHR(10) & CHR(13) characters.

Fields are optionally enclosed in quotation marks (" "), and are separated by commas or the Tab CHR(9) character. Record terminators do not consider quotes.

Select a Separator to specify CSV or Tab delimiter.

User Delimited

The Separator and Terminator selections become available.

  • Separator - the character(s) that separates the fields. Defaults to ",".
  • Terminator - the character(s) that separates the lines. Defaults to CRLF Chr(13) & Chr(10).

Excel Worksheet

The first Excel Worksheet becomes available (default). Select the sheet from your workbook.

 

Input File

The name of the memory table import file.

Separator

Select the character that separates fields in the file.

Terminator

The character to signify the end of the record.

Excel Worksheet

 

Used for Excel Worksheet files, select the worksheet to input from.

Note: Do not use apostrophes (') in worksheet names, as this can cause problems.

First Line Contains Header

Selected, input file contains a Header line.

Memory Table Name

Enter a meaningful name for the memory table.

Add Fields (Alt+F)

Adds fields from the Input File to the list of fields. You will be prompted to enter which line number contains the header line.

Fields Tab

No.

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

Name

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

Display Label

An override for the label to be displayed for the field, leave blank to use the field name as entered.

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 has an existing field type.
  • Custom Domain to define the field size for String fields, when the field does not meet an existing field type.
  • A new Domain when the field is a new Lookup field.

If an existing Domain (excluding Custom) 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 ####.###.

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. When the table is saved, the table must be saved as {tablename.adb}. The Lookup field must be Selected when a custom 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.

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.

Width

The width of the field in characters. The digit 0 is used as the standard width character. If the field contains all upper case characters, set it wider than the number of characters to see all the data in the field.

Required

Selected, a field value is required before saving.

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

Visible

Selected, the field will be shown in the memory table.

Clear, the field will not be visible in the memory table.

Grid Toolbar

ToolbarExpand

Expand Toolbar (Ctrl+F9)

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

Insert (F4)

Insert a new field at the selected line.

Move (Shift+Up) (Shift+Down)

Select a field and reorder the list.

Delete (F3)

Delete the selected field.

Buttons

Generate (Alt+G)

Generates the MaxBasic code to build the memory table based on the selections, and opens in the MaxBasic Script Editor.

View Data... (Alt+W)

Formatted data from the input file displays in the grid. You can check the format validity against the data.

ActionTable

Table Schema (Alt+T)

Load a custom table or an Accredo table schema.

Load... (Alt+L)

Loads options for an existing memory table, to use or edit.

Save... (Ctrl+S)

Saves the memory table builder options. Saved files can be loaded into the Form Designer Memory Table Designer.

In This Section

Memory Table Builder - Keys tab

Table Field Types