Note: This are not set in stone. If you think things should be done in a different way, please contact the other members of the development team and make your case. We’re always looking for better ways to do things.
Naming Conventions:
Use camelCase (no spaces or special characters, first letter lowercase than the first letter of each additional word in capital). Examples:
- myField
- $myVariable
- myCustomFunction
Main descriptor first followed by more specific descriptions. Examples:
- nameFirst
- nameLast
- addressCity
- addressState
Variables:
Use the most description names you can within reason. For example, if a variable contains the UUID of a contract record, it should be named $contractUUID. Don’t use short hand since the next person to look at the code might not know the shorthand.
Fields
- Globals: suffix of “_g”. Example: myTable::myGlobalField_g
Calculation Fields: suffix of “_c”. Example: myTable::myCalculationField_c
Auto Enter Fields: suffix of “_ae”. Example: myTable::myFieldNameIndexed_ae”
Booleans: suffix of “_b”. Example: myTable::isBooleanField_b”
Note: There are no true boolean fields in FileMaker. It should be understood that a boolean field is a number field and will only contain the values “”, 0 or 1
Reasoning: Fields should be sorted alphabetically by default. When sorted this way, fields that deal with the same topic should be together and you should be able to tell what kind of field you are dealing with by specific descriptors.