AutoGenerate Fields

An autogenerated field is an inputfield in a Tstruct that has AutoGenerate as its mode of entry. These are used to generate sequence of numbers.

Autogenerate fields are useful in transactions where numbers need to be unique and in a sequence. For instance, in invoice generation, every invoice entered is identified using a unique invoice number. The invoice numbers should be unique and in a sequence like INV-000001, INV-000002 and so on. By maintaining these sequences, the repository of the invoices entered can be organized and tracked.

Rules for Autogenerate

  • If an inputfield is set to AutoGenerate, it is mandatory to specify the sequence .
  • A sequence is identified by a prefix and a unique number  which is generated from a given starting number and concatenated with the prefix. The Sequence should be defined in the Details property of the inputfield. There can be multiple sequences for an inputfield,but only one can be active at a time.
Define Sequence window

Define Sequence window

  • There can many auto generated fields in a tstruct. There can be more than one sequence for an auto generated field. Prefix cannot exceed 30 char.
  • Prefix can be set based on a value in another field. In this case it can be of any width. The parent field can be of any mode of entry excluding autogenerated and a combination of these. If the value in the parent field starts with a colon then every time a unique value is entered in the parent field, the numbering will start from the starting number specified in the TStruct.
  •  Prefix can be set programmatically using the Setsequence function
  • Hidden fields also can be autogenerated. There can be fields that are calculated based on an autogenerated field.
  • A child transaction posted through GenMap can also contain any of the above autogenerated fields.
  • A transaction containing autogenerated field can be imported using the CSV import task in actions. Overwriting of existing data is also allowed. A transaction containing autogenerated field can be posted using the SQLPost function.
  • Autogenerated fields will not be changed when a transaction is modified.
  • Autogenerated fields can be activated or deactivated at runtime by clicking the […] button next to the inputfield