Steps to create a simple TStruct

This section describes the steps to be followed to create a simple TStruct.

The TStruct definition is as given below :

Type Name Caption Properties
Tstruct vend Vendor
DC1 dc1 Details Table Name= Vendors
InputField SupplierName Supplier Name Data Width=50,
Allow Duplicate=False,
Allow Empty=False
InputField Address Address Data Width=150
InputField TaxNo Tax Number


  • In the Build mode, click New->Form/TStruct.
  • In the TStruct definition window,enter the Name and Caption of the TStruct in the first row.
  • In the second row,change the Caption of DC and set the Table Name property.
  • To define the data elements for the DC, click on the empty grid line after the DC.
Adding components to Tstruct

Adding components to Tstruct

  • Double click to select InputField .Enter the Name and Caption and set the Data Width, Allow Duplicate and Allow Empty properties as given in the above table.


  • To add subsequent InputFields , click Add Row Button.
  • Click Save to save the TStruct. Click Yes for “Do you want to create a Page for this TStruct? ”.
  • The TStruct will now be displayed as a page in the Menu on the left hand side.

Note : When a TStruct is created and saved,a form is created in the front end and a database table is created n the backend automatically. In the table, a field named <tablename>id is created and made the primary key.In the above eg., a table named Vendors will be created in the database. The fields defined in the TStruct will be created as fields in this table. Additionally a numeric field or a Source record id named Vendorsid will be created in which a unique number will be generated & stored.

The Source record id is

  • The primary key for this table.
  • Generated automatically by Axpert.
  • The surrogate key that is used to relate with other tables in the system. This does not stop you from creating your indexes to this table in database.

You’ve now created your first TStruct in Axpert. The next topic will introduce you to the  Form Designer in Axpert.