Previous Topic

Next Topic

TD Tutorial: Create a Yes / No table available to other tables

This example shows the steps required to add a new table that contains Yes and No options. This would be useful if users prefer selecting "Yes" or "No" to using a tick on/off checkbox. The table can be used by other tables.

1) Open Table Designer, add a custom table with fields to store the Text Options and descriptions. (All Lookup Fields require a Description.)

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

Add the following fields to your new Custom Table.

Field 1

Name

TextOption

Type

String

Domain

Z_TextOption

Size

15

Lookup

True (selected)

Required

True (selected)

Upper

True (selected)

Field 2

Name

Description

Type

String

Domain

Short Description

Size

30

Description

True (selected)

Note: You will need to type in the Domain name Z_TextOption as it will not be in the drop-down list. When you are adding a new field, you need a unique domain name starting with Z_, to allow the field in the custom table to be set as a Lookup field. You can later add this field to other tables, by selecting this domain name.

2) Add an index to the table.

Navigator > Setup > Table Designer > Table Designer > Keys tab

Key 1

Name

TextOption

Unique

True (selected)

Primary

True (selected)

Parts

TextOption

3) Save the table as TEXTOPTION.ADB. Also save the table as an .XML template file for later deployment. The table will be registered in the Table Register automatically on save.

4) To create a grid based maintenance form add a shortcut to the Navigator:

Navigator > Setup > Table Designer > Table Register > ScriptAddShortcut Add Form To Navigator button > Script Shortcut Editor will open.

Shortcut Type

TD Custom Table Form

Table Name

TEXTOPTION.ADB

Form Caption

Text Options

Available in Navigator

True (selected)

Tab Name

Maintain

Action Name

Company\Text Options

Navigator Order

131 (beneath Memo List)

Save the shortcut. You will now have a new shortcut: Navigator > Maintain > Company > Text Options.

5) Open the Text Options table from the new shortcut: Navigator > Maintain > Company > Text Options. Add YES and NO entries to the table (descriptions can also be Yes and No).

6) To add the text options to an existing table, open Table Designer, then load the table. For example, you could add them to the Categories3 table created in the previous tutorial.

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

7) Add a field to the table, with the domain Z_TextOptions. For example, you may want to add a field called Restricted, with the available values being Yes or No. Go to the end of the field list (Ctrl + End), press the down arrow key to add a new line:

Field

Name

Restricted

Type

String

Domain

Z_TextOption

Size

15

Upper

True (selected)

Custom

True (selected)

9) Save changes to ARCAT3.PDB. For later deployment save the table as an .XML template file, Close Table Designer.

10) Open AR Categories 3 from Navigator > Maintain > Accounts Receivable > Categories 3.

You can now add the TextOption table to any other table. When adding fields to a table, instead of adding Boolean fields, you can add a Z_TextOption domain field.

See Also

Extend Accredo Tables

Book Contents

Book Index