Dataform field naming standards

This topic describes the standards and conventions for naming dataforms and dataform fields.

General guidelines

Care should be taken when first creating a dataform, as the underlying database table is generated from the name at the time of creation. For example, if a dataform is added with the name Certs, a database table gen_Certs is generated, where gen_CertificateOfInsurance would have been preferable.

So, when adding a dataform, think about what you would want the database table to be named, then, after it is created, the form name can be changed to something more human readable or industry jargonized, without having an effect on the underlying database table.

Field names are in Pascal Case, which means that field names are created by concatenating capitalized words. For example:

FirstName
GrossPayroll
MinAdminPerAccount

Prefixes are all lowercase. For example:

luState
fsOrganizationInformation

When using the ID suffix, both letters should be uppercase. For example:

fkEmployeeID
fkUserID

Note:  Always examine the automatically generated field name after typing in the label to make sure they are Pascal Case and have the appropriate prefix and suffix. DO NOT leave a field with a long winded name because of what the label is. For example, a field with the label “Are union workers or employees under collective bargaining agreements employed?” should not be left as the automatically generated name. In this case, it was appropriately shortened to luEECoveredUnderCBAEmployed.

Datatype guidelines

Prefix fk and suffix ID

Any fields that store an ID to another entity should have the prefix fk and the suffix ID.

Example: fkEmployeeID

A few examples of foreign key datatypes:

Any of the Organization or Contact datatypes
Any of the User datatypes
Parent Form
Comp Code Suggest
Employee Type Ahead
Project Type Selector
Role Selectors
Workspace Selectors

Prefix lu

Lookup (core) have the lu prefix.

Example: luStatus

Prefix mlu

Lookup – Multiple (core) have the mlu prefix.

Example:

mluCommissionMethod
mluCertifications

Is, Has, Can

Check boxes store a Boolean value (True/False, Yes/No), so they should start with the word Is, Has, or Can, depending on what sounds more correct.

Example:

IsBrokerSubmitted
HasCustomPayroll
CanCreateWorkspace

Date

Date fields should begin with the word Date.

Example: DateReported

Prefix fs

Field Sets should have the prefix fs.

Example: fsContactInformation

Prefix sf

Secure attachments should have the prefix sf.

Example: sfLossHistory

Other datatypes

All other datatypes should stick to the Pascal Case convention.

Examples:

GrossPayroll
(Decimal)
TotalEmployees
(Integer)
GeneralNotes
(TextArea or Log)
LastName
(Text)
PrimaryEmail
(Email)