Record types tab

This tab shows the record types in the database.

Creating or changing a record type

Use the New Type button to create a new record type.

The type has a name and description. The description is more easily entered first, because Axisbase will automatically remove the punctuation from the description to suggest a name. For example, you could enter the description "Sale detail" and Axisbase will suggest the name "saledetail". Names of types and properties are in lower case.

Create at least one property (see section below for details). When you press OK, the new type shows up in the Record Types list, but there are no records of that type yet.

When you change an existing type using the Open & Edit Properties button, the changes will affect all existing records. In particular, note

  • If you delete a property, all data for that property in all existing records will be deleted.

  • If you change a type that is included in other types, ALL of those types will be affected.

  • Axisbase interprets changed properties by name, so if you rename a property, it will be treated as if you deleted the old property and added a new one. If you want to rename a property and preserve the data, use the Rename Properties button instead.

Property details

In the property details window, you can add one or more properties to a record type. (Use Save & New to add several in a row.)

You should define the property that holds the main display name or description first in the list of properties: this simplifies life later on.

The data type of the property is shown in two entry fields. The first gives you a choice of "One" or "Reference to". If you choose "One", the second list gives you a choice of all the built-in data types and the other user-defined record types. Use "One" to include the built-in or user-defined type in the type you are creating. Use "Reference to" to include the key value only.

Example: The customer property of a sale record should be a reference. If it was entered as "one customer" then every sale would have a complete customer record in it, which is usually not what is desired.

In order to enter a display type, you should have the display type already defined. However, you are permitted to enter any display type name. If the named display type isn't found, it won't function

Type level data

You will normally leave the type-level data area of the record type window blank. When needed, it may contain information in the format "name=value". The type level data names that are currently used are:

  • lookupsearchby - When Axisbase allows the user to search for records of this type, the property named here is the one used in the search. For example, if the type you are defining is for company departments, and you enter "lookupsearchby=deptcode", and there is a property called deptcode, then users will be able to search for department by deptcode. If you omit this type-level data item, Axisbase will use the first string-typed property for this purpose.

  • lookupdisplay - When Axisbase displays records of this type in a list of references, the lookupdisplay expression controls how the record is shown. If you omit this type-level data item, Axisbase will use the first string-typed property for this purpose; but if lookupsearchby is defined, it will use that property.

Since "lookupdisplay" must be an expression, you can't just name the property to show; instead it has to be qualified with the Axis ID and type name, as in this example:


lookupdisplay=#SATURN.dept.deptcode " (" #SATURN.dept.description ")"

This example tells Axisbase that when a department is referred to by another type, and the user needs to search for a department, the user will search by the deptcode property, and view a list of matching departments in the format "code (description)". For example, the user might see this list:

TR (Training)

SA (Sales)

EXEC (Executive)

XML exports of record types

There are two ways to export record types.

The normal mode is "For Recreating Record Types". This causes the XML to contain all the information needed to create the types in another database.

The alternative is "Treat Types as Data". This is useful if you want to create a printed report of your data model. To do this, export the types as data, then create a Data Outsource to read the metadata. (Metadata is data that describes the structure of data.). Then create a list to format the Data Outsource.

Miscellaneous rules

  • Record types can contain references to types in the same database, but not to types in other linked databases.

(c) 2014-2015 Divergent Labs, Inc.