Looking for information about ProntoForms features and functionality? Visit our Product Documentation Portal.
Duration Calculations and Duration Time-Based Math produce a Duration value based on the values of other answers. They are often used in timesheets or work orders to calculate time worked, or to estimate the amount of work needed.
The Duration Math specifically calculates the duration between two date/time entries, while the Duration Calculation is more flexible: it will calculate a duration based on other duration questions and/or numbers.
Both of these question types appear on a mobile device as a simple read-only duration question and will automatically update based on the answers to to the source questions. A sample is shown below on an iOS device:
If you need to display a date or time, use Time/Date Based Math.
In the Form Builder, the Duration Math and Duration Calculation question types appear as shown below:
The Question Edit screen for these question types has three tabs: General, Properties, and Help Options. This article will go through each of the tabs.
The Unique ID is the reference for the question. For more information on Unique IDs, read: Overview: Unique IDs. It can either be auto-generated based on the question text, or customized.
Data Types control what kind of information can be considered an answer to the question. The Duration Calculation and Duration Math question types only accept one Data Type: Duration.
Restrictions control how your mobile users interact with a question. They can be set on the question itself, or controlled by Conditional Logic.
|Required||Read-Only||Hidden on Device||Hidden in Reports|
* The Duration Calculation and Duration Math question types cannot be made Required because they automatically take information from other questions without interaction from the mobile user. It is Read-Only by default for the same reason.
Properties allow you to set up your question in various ways.
The Duration Calculation uses the Calculation Builder, enabling form designers to build calculations using questions with numeric data types that come before it in the form.
Tip:If you don’t specify a Min Value, the minimum value defaults to 0 to ensure that the result is a positive number.
The Duration Calculator does not require a duration value in its calculation, but always attempts to output a Duration value based on the source questions. The form designer must verify that the selected questions are appropriate.
For example, you could, in theory, set up a duration calculation that multiplies a site temperature reading by the invoice number and deploy the form. The app would output a Duration value based on that calculation, but it the result would be meaningless.
Duration Math questions require two previous Date/Time questions to calculate the duration between them. Select which is the Start Date/Time question, and then select the End Date/Time question from the dropdowns.
Note: Ensure you select the appropriate Precision reading for the usual span of time you expect this question to yield. For example, if your mobile users will be taking two Date/Time stamps in short succession (perhaps entering and exiting an inspection site), using Minutes may be a better choice for Precision than Hours.
Adding "Help" content to forms gives mobile users access to support and other resources out in the field. Help content is available to users through a button embedded beside a question. Any question in the form can include a link to YouTube videos, web pages, or HTML-formatted work instructions.
For more information on Help Content, please read: V2 Forms: Adding Help Content to Questions