Learn how to set up calculations by using the smart field.
TABLE OF CONTENTS
1. Setup
The "Smart" input field is a very powerful tool for real-time calculations in the input form. Drag & Drop the smart field into your form and define its logic: | ![]() |
![]() | The text that will be displayed on the screen for the item question is entered in the "Display label" field (e.g. 'BMI'). |
![]() | The system automatically fills in the database label and it does not require any further attention. |
![]() | The "Export label" field is also automatically populated by the system. However, it is advisable to create unique export labels. When exporting data (e.g. via Excel or CSV), these labels appear as column headings. |
![]() | You have the option of entering a description. This text will appear in light grey below the input field. |
![]() | a) Select "Numeric output" for calculations with numeric output. b) Select "Text output" for logics that imply a text output. ⭐ Good to know: When including single choice or dropdown fields in the smart field, the option label will be used in the "Text output" and the value in the "Numeric output" logics. |
1.1 Smart Field output - numeric output
![]() | a) Select "Numeric output" to perform calculations on number fields. For configuring 5b) text outputs refer to section 1.2. Smart Field output – Text output. |
![]() | Count missing values as 0: If you select "yes" and any input field used in the formula is empty (no value entered), hidden due to form or field dependencies or is marked as unavailable, the formula will be calculated and this field will be assigned the value 0. Otherwise, the calculation will only be performed once a value has been entered and the formula is considered "complete". |
![]() | To define the formula you can use the available input fields, operators, functions, and any numeric values. ⭐️ Input fields list: Use any of the number or slider fields in this form, as well as any single-select or dropdown fields with numeric values. ⭐️ A conditional expression must always include both ? (if) and : (else). Example: If a “unit” field uses the option values 1 for grams (g) and 2 for milligrams (mg), and a user enters a value in a “result” field, you can convert the result into milligrams by applying the following syntax in a smart field: {{unit}} == 1 ? ({{result}} * 1000) : {{result}} This means: if unit is equal to g (value 1), multiply the result by 1000, else keep the result as it was entered. Conditional operators (<, >, <=, >=, ==, !=, AND, OR) should only be used inside conditional statements (?, :). |
![]() | Create your formula by selecting the input fields, operators and functions you want to use. You can also enter any numeric value, of course. ⚠️ However, make sure you use a full stop (.) as the decimal separator to ensure valid syntax. The example shows how to calculate body mass index (BMI). |
![]() | Clicking on "Check syntax" will take you to the "Syntax check" tab, where you can enter actual numbers into the relevant input fields to test the displayed syntax. ⭐️ All calculated numeric output values are rounded to two decimals if applicable. |
![]() | Remember to save your smart field by clicking "Update basic field information". |
Best Practice
With psychological questionnaires in particular, it is common to calculate a quotient based on the responses provided. With our system, you can allocate values to your answer options (read more about this in the following article). You can carry out calculations using these values in the smart fields. In most cases, it is not desirable for subjects to see their quotients/scores in the questionnaire itself. For this purpose, we recommend mirroring these fields into the eCRF (visit events). Read more about this functionality in the following article: How do I set up a mirrored fields functionality?
1.2. Smart Field output – text output:
![]() | b) Select "Text output" to include text fields into your formula. |
| |
|
2. Smart Field in data collection
A smart field behaves like any other field in the form: it appears in exports, is integrated with validation and notification workflows, and is tracked in the audit trail. However, it is not editable by users; instead, it auto-calculates once all required input values are present (or if “count missing values as 0” is enabled).
⚠️ Please note: a smart field does not automatically re-calculate when a new smart field is added via amendment or when it is updated. For subjects where the calculation has already run, it will re-calculate the next time the form containing the input variables is updated. For new subjects, the calculation will run as normal.
|
3. Video
How do I set up a numeric smart field?
The "Smart" input field is a very powerful tool for real-time calculations using numbers, slider, single choice and dropdown fields.
For example you may want to calculate a BMI (Body-Mass-Index) or sum up the replies of a questionnaire by assigning numeric values to the answer options in a single choice type of question.
When including single choice or dropdown fields in the smart field, the option label will be used in the "Text output" and the numeric value in the "Numeric output" logics.
✉️ Still have questions? Feel free to contact your Customer Success Manager or email us at support@climedo.de. |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article