Custom Field – Creation
Custom field is a module located in System > Custom Fields [1] and is used to create new fields inside each available model. You can see the grid with all the models in your environment and you can filter them by name and model alias.
Model
When you click a model, the following window will open. This window contains the model details [1] and on the left side is the menu for the model. The model details are the model alias, model name and the status of this model. On the menu [2] you have:
- Model – current model information, currently selected.
- Fields – where you can create new fields and edit the previous created ones.
- Events – here you can create new events or edit the created ones.
- Table Management – here you can manage the database table directly.
- Import/Export – is used to import/export different fields and events from this environment to a new one.
Fields
‘Fields’ tab is located below model and is used to create new fields or modify already existing fields. You can filter the existing fields by the tab [1]. The most used filters are:
- Defined by user
- Label
- Column name
You can create a new custom field by clicking “Add Field” [2] or you can edit the existing ones by clicking the corresponding row, clicking the icon in the “New Tab” column or the icon in “Action” column.
Add field
When we click “Add Field” button the following page will appear. On this page you can fill the required data to create a new field on the selected module. These fields can change if we change the value of the element type.
The fields have the following meaning:
SECTION FIELD | ||
Field | Description | Note |
Label | Name of the field that will appear as its title |
|
Column Type | Type of column in the database | At the bottom of the this article it is explained in detail, here is a list: -text – long text -entire -decimal -date – a column must not be created in the DataBase because (for example) it is a display-only field |
Element Type | It is the type of HTML element displayed on the form Template. | Several values are possible and the details will be discussed in the next article. The most important are: –Activity: an element for inserting and viewing Activities will be displayed in the form. –Attachment: an element for inserting and viewing Attachments will be displayed in the form. –Category: an element for inserting Categories will be displayed in the form. –Date / Datetime: an element for inserting Date (or Date / Time) will be displayed in the form. –RelationGrid: a grid for the relationships between records will be displayed in the form (see this guide). –Select: a select-box will be displayed in the form. –Text: a text box will be displayed in the form. –TextArea: a text-area box will be displayed on the form. |
Column Name | Name of the column within the Database | When created by the user, the prefix “cust_” is added |
Status | Status of the custom field. Use this setting when creating a field, to create it directly in the DB, or create it in the DB at a later time. This is used to set the field in the DB and / or to create it on the DB. | –Enabled: the field is enabled and created in the DataBase. –Disabled: field not active. –Pending: the field has just been created and is not yet inserted in the DataBase. For example, you can keep it in the “Pending” state and create it only when there is less activity on the DataBase (in order to be able to check the configurations). |
SECTION ADVANCED | ||
Field | Description | Note |
Global Search | Allows you to search for the field in the global search | –Yes: adds the field in the global search –No: do not add the field in the global search |
Class | CSS class of the element displayed in the form |
|
After Element HTML | HTML code that is inserted after the element. It is used to override the HTML code of an element. | For example, if you configure a text-area column with a link to a map, here you can insert the HTML code for viewing the map instead of a text-area |
On Click | Javascript event triggered by clicking on the element |
|
On Change | Javascript event triggered when the element is changed |
|
Values | For the Select fields the list of values, in the form of a PHP array (key – value) |
|
Custom Element Data | An array retrieved, for example from a custom source to populate the element. | For example the call to an external REST API that populates a Select with the values retrieved from a list of an external software |
- Status – is the status of this field, if it will be used or not.
- Type Code – is the return type of the field when we use it inside Flow.
Following the definition of the new custom field, it will be inserted within the fields available in the form template of the module entity.
We have different element types that we can chose from depending on what we are going to store and how we are going to store it.
- Activity
- Address
- Approvalgrid
- Attachment
- Category
- Checkbox
- Color
- Cronexpression
- Date
- Datetime
- Deeppassword
- Editor
- Emailaddress
- Emailgrid
- Emailwriter
- Grid
- Rating
- Relationgraphview
- Relationgrid
- Select
- Signature
- Inventoryitemgrid
- Inventorymovementgrid
- Invocegrid
- Invocerelatedmodelgrid
- Kbtips
- Label
- List
- Multiselect
- Number
- Password
- Percentage
- Price
- Progressbar
- Qrcode
- Radio
- Radios
- Task
- Teamviewer
- Text
- Text area
In the next article we are going to explain the element type simple.