Working with generated fields

Infor e-Commerce Development Studio lets you maintain information on how values in database table fields are generated. This information is contained in the database model file sqlserver.mod which is a part of the application model.

To add a generated field

  1. Go to Data Sources.
  2. Right-click on the data source and select Mappings.
  3. Right-click anywhere in the list of Business Object Mappings and select Generated Fields... from the context menu.

    The Generated Fields window is displayed, showing the current settings.

    Using this dialog, you can specify that the value in any existing table field is a generated value and specify the way in which it is generated.

  4. Click Add.
  5. Set the following:
    Type

    Specifies the type of generation. See the table below.

    Prefix

    This is only available for the "auto-alpha" generation type. You use it to add text to the start of the value.

  6. Click OK.
Type Description
auto-alpha

When inserting new records, a unique value will be generated using the special system used in Infor e-Commerce.

The code generated for this type of value will call a stored procedure called TVFSequenceNextval (hard coded). This procedure uses a table called Sequence to track current values and to find what the next unique value should be for each table.

Note: If you supply a value, it is inserted – otherwise it is generated.
trigger

When inserting new records, a value will be generated following the criteria established in a database trigger.

In Infor e-Commerce, many of the table keys are trigger-generated.

Note: If you supply a value, it is inserted – otherwise it is generated.
identity When inserting new records, a new key value will be generated following the default database criteria for generating identity values.