Creating a date field

This article explains how to determine the number of days between a given date and today's date. This feature is very useful in the manufacturing sector, for example to find out the number of days since the last accident.

1. Create the text field in the template

Using the tool at the left of the template editor, create a text field.

text

2. Create the text field definition

Using a title of your choice, name the text field. At the fourth field, select the “Date’’ type.  

definition

date

3. Link the text field to a definition

Double-click the text field you previously positioned in the template. Then, click on the “Code” button.

code1

Copy the following text in the window that will appear:

<span contenteditable="false" data-field="Date" data-function="DaysSince">[Date]</span>

Note: Do not forget to change what is between the quotation marks (“) of the data field for the name you have given to the field.

4. Save