How do you create a custom field?
All modules are ready to use with a predefined data structure (fields) adapted to its content. Nevertheless, you may need some extra fields or numbering options for your lab specific information.
LabCollector allows you to create unlimited extra fields in each module in order to personalize your data forms.
i. Go to Admin > Data > Custom Fields
ii. Select the module where you want to add or edit custom fields in the list to the left.
iii. Add a new field by indicating its name (1)
iv. You have the possibility to add an helper text visible in edition mode (2)
v. Choose the custom field type (3). For more information, please read KB xxx.
Once created, all the custom fields can be edited , configured or deleted .
The modification panel is relative to the type of custom field. Usually, you can change the field name, change some options as color and mandatory status or change/add the category.
You can also convert field type, knowing that existing data will be kept:
- From Checkbox to text or multiple select list
- From Select list to text
- From Text to select list (existing data will be grouped as select options)
- From Text to checkbox (existing data will be grouped as checkbox options)
- From Text to multiple select list
Some fields can be configured as text field with mask:
- You can provide basic plain text, just by writing it in the field.
- If you want to use an intelligent mask, write it between two ~ using the special characters below:
A = Any alphanumerical character [A-Z; a-z; 0-9]
Z = Any letter from A to Z [A-Z], uppercase
z = Any letter from A to Z [a-z], lowercase
X = Any letter from A to Z [A-Z; a-z], case insensitive
This icon indicates that the field has a mask and if you hover over it with the mouse, the field mask appears.
Checkbox and select lists can also be configured by adding values (write the value in the field and click on update button). You can select a default value by checking one of the spots on the left, and add values by uploading a CSV file (only for select lists).
vi. At the end, you have several options
vii. Choose the category of your fields if needed. For more information, see below.
viii. Choose an optional background color for the field row. You can change this color by editing the custom field.
ix. Save new field button when you have done.
- If you delete a field, all data stored on that field will obviously be lost!
- When editing a field, if you reduce its size, longer data may be truncated.
- Some field names can induce MySQL errors. If such problem happens, use another name.
Fields can be grouped into specific categories. This helps to organize custom fields for specific usage for different types of records.
1. Create a Select List custom field in the module of your choice.
2. Check FIELD CATEGORY.
3. Follow the previous steps and save the new field.
4. Edit the values list using the icon that will represent the categories. The configuration is the same as for a standard select list (see above).
5. Once that is done, each new field can be assigned to the general category or to a specific category that you have defined.
6. Now when you create or edit a record, only common and category related custom fields are displayed. For example in the Sample module, field category: HYDROTHERMAL
Some data can only be available in Analysis tab, and not in the general record. For example, data obtained later or which are changed in time.
To create a field in this Analysis tab, choose the option. A green microscope icon identifies fields in Analysis tab.
Use the same green icon on the left of your record to open the tab.
If you use a line separator, the page is shown as below. To change the view, use one of the icons at the top right. You can print these results independently of the all record. These values are not exportable for the moment.
To add/edit values just click in the button on the bottom. The edition depends of the field type. Don’t forget to click on Update analysis.
You can also import values as in the general export function. This function is only available for text, date and URL fields.