You can learn how to create a new Form Field from this article.
The Numeric Field is designed to capture basic numerical values without predefined formatting. This flexibility allows you to customize the format according to your needs. However, if you require specific formatting, you may opt for Currency or Percentage fields instead. Keep in mind that both of these fields impose a two-decimal limit.
For further details on these options, refer to the following tutorials:
In this article:
- Navigating to Form Fields
- Configuring a Number Field
- Formatting a number field
- Currency formats
- Percentage formats
- Time formats
Navigating to Form Fields
Go to Settings > Apps, select the app you'd like to add the field to and select the 'Form Fields' tab.
Configuring a Number Field
To set up a Number field in your app, follow these steps:
- Add a New Field: Click the Add Field button to open the Field Type selection window.
- Select Choice Type: From the list of available field types, choose the Number option.
- Configure the Field: After selecting the Number field, proceed with the configuration settings as needed.
Give your field a name and add a field hint if desired. You can then select the section in which the field will be created or keep the default option.
The field type must be set to 'Number'.
The Precision setting determines the number of decimal places stored for a Number Field. This allows you to control the exactness of numerical data by specifying how many digits are retained after the decimal point.
When the Precision field is set to 2, any inputted number will be stored with two decimal places. For example, if you enter 1.1234, it will be saved as 1.12. Setting Precision to 0 ensures that only whole numbers (integers) are stored.
If the Precision field is left blank, the system will store numbers with unlimited decimal places.
Note: This field applies only to how real numbers are stored. To change how Number Fields are formatted and displayed, refer to the next section here - as this is achieved through a Format Mask
If desired, you can set a default value for all new records. Team members will have the option to override the default value if needed.
Formatting a Number Field
You can customize the presentation of numbers in your fields to display them as:
- Currency
- Percentages
- Times
-
Plain numbers with:
- Decimal places
- Thousands separators
- Abbreviations
For a comprehensive list of formatting options, please visit the Numeral.js website.
Number | Format Mask | Result |
10000 | 0,0.0000 | 10,000.0000 |
10000.23 | 0,0 | 10,000 |
10000.23 | +0,0 | +10,000 |
-10000 | 0,0.0 | -10,000.0 |
10000.1234 | 0.000 | 10000.123 |
100.1234 | 00000 | 00100 |
1000.1234 | 000000,0 | 001,000 |
10 | 000.00 | 010.00 |
10000.1234 | 0[.]00000 | 10000.12340 |
-10000 | (0,0.0000) | (10,000.0000) |
-0.23 | .00 | -.23 |
-0.23 | (.00) | (.23) |
0.23 | 0.00000 | 0.23000 |
0.23 | 0.0[0000] | 0.23 |
1230974 | 0.0a | 1.2m |
1460 | 0 a | 1 k |
-104000 | 0a | -104k |
1 | 0o | 1st |
100 | 0o | 100th |
Here is an example:
To remove the decimals of a number and add a thousand separators, 10000.23, you will need to input 0,0 in the format mask field. The result will be 10,000.
Currency Formats
Number | Format Mask | Result |
1000.234 | $0,0.00 | $1,000.23 |
1000.2 | 0,0[.]00 $ | 1,000.20 $ |
1001 | $ 0,0[.]00 | $ 1,001 |
-1000.234 | ($0,0) | ($1,000) |
-1000.234 | $0.00 | -$1000.23 |
1230974 | ($ 0.00 a) | $ 1.23 m |
Percentage Formats
Number | Format Mask | Result |
1 | 0% | 100% |
0.974878234 | 0.00% | 97.48% |
-0.43 | 0 % | -43 % |
0.43 | (0.00 %) | 43.00 % |
Time Formats
Even though it is a number field, it also accepts Time values. If you want to add a formatting mask for them, you have the following options:
Number | Format Mask | Result |
25 | 00:00:00 | 0:00:25 |
238 | 00:00:00 | 0:03:58 |
63846 | 00:00:00 | 17:44:06 |
Number fields can also be calculated. Just enable the 'Calculated' checkbox and add your custom code in the space available for it.
Enable the 'Required' checkbox if the information for this field is mandatory. It means that if you enable this option, every time a team member creates a new record, they will need to input a number for this field in order to save it.
If you enable the 'Lock After Create' as its name implies, the field will be locked once the new record is saved and the value of the field will not be editable afterward.
Once you are done setting your field, click the save button.
Note: All new fields are added at the bottom of the form.
Changing a Field's Type
In Servis.ai, once a field is created, its type (e.g., text, number, date, boolean) cannot be modified directly. This limitation helps ensure data consistency and prevents errors that could arise from incompatible data formats.
If you need to change the type of an existing field, you’ll need to follow these steps:
- Create a New Field: Go to the Form Fields tab on your App's Settings and create a new field with the desired type (for example, switching from a text field to a number field).
- Deactivate the Old Field: Once the transition is complete, you can choose to delete the original field or simply hide it from views to avoid confusion.