Adding a Serial Number

The following section explains how the Serial Number works and describes how to add a Serial Number when designing a Form. It also presents ways to customize the Serial Number using the content of other fields to make it easier to remember.

Every Record stored in ActivityInfo is automatically assigned a unique, randomly-generated ID when it is created. By using a Serial Number field in your Form, you can identify more easily each Record thanks to an easier-to-remember format that consists of sequential numbers such as "000023", "000024".

If you add a Serial Number field in your Form, this field automatically becomes the Key field for your Form and you cannot add other Keys. 

Only one Serial Number field can be added per Form.

To make it easier to trace or remember a Record, instead of just having a number you can add a prefix to it that will give more traceability to it, without revealing sensitive information. To do this you can you add a Prefix Formula.

This is useful because it allows you to identify any specific Record in the Table View quickly.

Also it allows users to easily refer to such a Record if you are using multiple Forms that link to each other with Reference fields.

In order to ensure that Serial Numbers are unique, they are only assigned once the Record is actually saved on the server. When you are editing a Record that is not yet saved, the Form field will be displayed as "(Pending)".

You can use Serial Numbers in Subforms too. In Subforms, the Prefix Formula can also derive from the Parent Form.

By default, ActivityInfo assigns a serial number using the format '%06d' which is 6 digits with padding with zeros.

Once a Serial Number is assigned to a Record, it cannot change. 

If Records were added to a Form before changes were applied to a Prefix Formula, the previous Serial Number will remain the same and the change will only be applicable to new Records.

If you save a Record while using a Database made available offline, a Serial Number will not be assigned to it until you have fully synchronized the Form to ActivityInfo.

Serial numbers can be particularly useful in setting up Case Tracking Systems, where case workers need an easy-to-remember identifier for each case that doesn't include personally-identifying information.

How to add a Serial Number

Adding the Serial Number field
  • In the Form Design page, click on "Serial Number" to select it from the Fields palette.

Fill in the Properties of the Serial Number by providing:

  • Label: give a descriptive name for the Serial Number
  • Description: optionally provide a description for the Serial Number
  • Code: optionally provide a code for the Serial Number
  • Prefix Formula: you can customize the Serial Number using another field; read the following examples for more information

In the Settings check the boxes you want to apply for the Serial Number.

Customizing the Serial Number field with a Single Selection field
  • You can customize a Serial Number using a Single Selection field. In this case users will be able to select the prefix from a list of options that you will provide them with.
  • Add a Single Selection field and add as options all the possible prefixes.
  • Click on "Done" to add the field.
  • In the Prefix section of the Serial Number field, click the arrow to reveal a list of options that can work as prefixes and select the Single Selection field.
  • Click on "Done" to add the field.
  • Click on "Save" to save the Form.
  • When a user adds a Record they won't be able to fill in the Serial Number Field as this is automatically filled by ActivityInfo. Instead they will see the word "Pending" in that field.
  • If you have used a Single Selection field to define the Prefix, the user will be able to select it when adding a new Record and this will be automatically added as a Prefix to the Serial Number that will be assigned to the Record.
  • This will appear in the Table View in front of the Serial Number.
Customizing the Serial Number field with a Text field
  • You can customize a Serial Number using a Text field. In this case users will be able to provide a short text which will be then used as the prefix of the Serial Number. You can also add an Input Mask to the Text field, to constrain what the users can type in the Text field.
  • Add a Text field.
  • Click on "Done" to add the field.
  • In the Prefix section of the Serial Number field, click the arrow to reveal a list of options that can work as prefixes and select the Text field.
  • Click on "Done" to add the field.
  • Click on "Save" to save the Form.
  • When a user adds a Record they won't be able to fill in the Serial Number field as this is automatically filled by ActivityInfo. Instead they will see the word "Pending" in that field.
  • If you have used a Text field to define the Prefix, the user will be able to type in the Text field that will be then automatically added to the Prefix.
  • This will appear in the Table View in front of the Serial Number.
Customizing the Serial Number field with a Text Formula
  • You can customize a Serial Number using more than one Text fields and Text Formulas.
  • Add the Text fields that you want to use and give them a Code.
  • Add a Serial Number field, give it a name and in the Prefix section of the Serial Number field type the Text formula. Use the Codes you assigned to the Text fields in the Formula.
  • Click on "Done" to add the field.
  • Click on "Save" to save the Form.

Take a look at the available Text formulas!

  • When a user adds a Record they won't be able to fill in the Serial Number field as this is automatically filled by ActivityInfo. Instead they will see the word "Pending" in that field.
  • If you have used Text fields to define the Prefix, the user will be able to type in the Text fields and the prefix will be automatically applied to the Serial Number.
Customizing the Serial Number with a field from a Referenced Form
  • You can customize a Serial Number using a Text field, a Single Selection field or a Serial Number of another Form. To do that you need to add a Reference field in your Form and reference the Form that contains the field that you want to use.
  • Then in the Prefix formula of the Serial Number field click on the arrow and select the field from the list or type in the Formula.
  • When a user adds a Record they won't be able to fill in the Serial Number field as this is automatically filled by ActivityInfo. Instead they will see the word "Pending" in that field.
  • If you have used a Reference field to define the Prefix, the user will be able to select their answer in the Reference field (which would be the Serial Number or any other Key field(s) of the referenced Form) and the Prefix will be automatically applied to the Serial Number.