Default field values for advanced guidance and control in data entry
With the support and contribution of ACDI/VOCA, it is now possible to add default values and the property ‘Read only’ to fields. Thanks to this functionality, you can design forms that include pre-populated fields. These fields can be edited by data entry users unless you turn them into ‘read only’ fields. You can use default values to guide users and speed up data entry or as a good reference value for sanity checks.
The default values are available for specific types of fields such as Text, Quantity, Select, Reference, User and Date. As default value, you can either set an explicit value (e.g. a number for a quantity field or a name for a text field) or use a formula to specify what the value should be (e.g. today’s date, email address of user, and more).
To prevent users from editing a default value -or any other field- you can check the ‘Read only’ property of the field.
Explicit default values
When you design a form, you can set an explicit default value for a field. The default value will appear to users doing data entry. Users will be able to edit the value if necessary, unless the ‘Read only’ property is checked for that field.
Please note that you cannot use default values with the Serial number, Attachment, Calculated, Reverse reference, Section header, and Subform fields.
Default values with formulas
For some types of fields, it is possible to add a formula so as to generate a default value. The formulas used in default values are handled differently from the formulas of calculated fields. Because these formulas are used to create a default value, if the data entry user edits the value, then the formula won’t run again and will accept the new value.
Please note that currently, it is not possible to add default values with formulas in the fields that don’t support default field values and in the Month, Fortnight, Week, Reference, User, Geopoint, and Select fields.
Default values combined with the ‘Read only’ property
To prevent data entry users from editing the default value (whether that’s provided by a formula or is a single value), you can check the ‘Read only’ property in the field that has the default value. This can be useful in a variety of situations.
For example, if you wish to capture the date that a record was added, you can add a Date field with a default value calculated from the formula TODAY() and make that field a ‘Read only’ field. The formula is evaluated once when the record is created and because it is combined with the read-only settings, it will remain static.
Tip: This is quite different from using the same formula in a Calculated field. In that case, the formula would always show the current date. This is for example useful when you want to evaluate a time span dynamically (e.g. getting the current age based on the date of birth).
Another example for using a combination of default values with the ‘Read only’ property is to bring in the data entry form the email address of the user adding the record. In this case, you would use a User field to bring in the lists of Users and a Text field which would use the formula Users.email to bring in those details.
Once the data entry user selects their username for the User field, the email address will be automatically populated with the email address of the user. To ensure that this field will not be edited during data entry you would need to check the ‘Read only’ property for the Text field.
There are many other ways you can use default field values to enhance data entry and empower your colleagues. We hope that this new functionality provides you with the inspiration to start designing even more powerful forms!
The ActivityInfo team would like to thank ACDI/VOCA for their support and contribution for the development of these features.