The Trends widget is a variation of the Numeric widget designed to provide a visual comparison of prior values recorded by the same question. The comparison can be in a tabular format and/or a graphical format.
IMPORTANT - The trends widget requires an Internet connection to retrieve the "prior values".
Given numeric values V(i) that are recorded at date:time (T(i), the Trends table values are calculated as follows:
In the example below V(i)=65. All the prior values where recorded on the same date T(i), so they are ordered by Date_Created (see explanation of the "Trending date" property below).
Adding the Trends widget is as simple as using a “drag and drop” motion to place on the form canvas.
The Trends question widget includes the following special properties that you can use to control the look and behavior of Trends:
Caption text - Refers to the question caption as presented to the user. Think of this as the title for the question; it should be self-descriptive. We recommend no more than three words for optimal display on mobile devices.
Hint - Additional help for the question will be displayed; short clear sentences work best. Use 80 characters or less for optimal display on mobile devices. The maximum number of characters is 500, including spaces. The following HTML formatting tags are currently recognized:
Android: <br>, <i>, <b>, <u>, <font color="xxx">, <H1>, <H2>, <H3>, <H4>, <H5>, <P>, <a>, <div>;
PDF reports: <br>, <font color="xxx">.
Data name - Represents the name of the data that will be displayed in column headings. This property is automatically filled in based on the Caption Text, but may be modified in the properties area. We recommend one or two word data names to keep column headings short. The maximum number of characters is 30. Spaces are not permitted in the Data Name field.
Required - Determines whether or not this field must be filled-in before continuing to the next question. On the mobile device, a form with an empty required field may be saved as “incomplete” but not as “complete” and hence cannot be sent to your website.
Use currency symbol – Places a currency symbol in front of the value. Note that these symbols are for display and PDF report purposes only. The currency symbol is not exported to Excel, CSV or other “Save as” formats. The currency also is not exported via web services or Sync & Save.
Number type – Integer or Decimal. Specifies whether the input number may contain a decimal point.
Range – Validates the input data in terms of a minimum and a maximum value.
Display trends button - Displays a button that must be clicked in order to display the trend table and graph. If not checked, the table and graph will be automatically displayed after the numeric value is entered. The button option is particularly useful in situations where an Internet connection is poor or non-existent (to prevent the doForms app from wasting time trying retrieve prior values form the website).
Number of values – This is the number of prior values that will be displayed in the trends table rows and/or the axes of the graph. These prior values will be read from prior data records submitted to your website. This value must be less than or equal to 20.
Trending date – This is a date:time field in the form that will determine the order of the prior values. You can use any date, time, or date:time field in your form; or you can use the system date_created, which is the date:time when the prior record was first saved as “completed” on the device used to capture it. Note that if for any reason the date or time field of two or more data records is the same, then the “date_created” will be used to determine their order.
Key field filter – This field is used to determine which records will be compared by the Trends widget. For example, if a single form is used for taking measurements at different sites, then this value would probably be a Site_ID or something similar. Using this property will guaranty that measurements taken at the same site will be compared.
Advanced - Clicking on the Advanced arrow will reveal “Relevance conditions” and “Skip conditions” properties that can be used of further control the behavior of your form using sophisticated logical statements. Please refer to http://support.doforms.com/hc/en-us/articles/200446034-Using-Relevance-Skip-Logic for more information on these properties.