Hour Widget - Perform hours calculations

Tags

1. Calculate hours

Performing calculations on hours is useful if you wish to automatically calculate hours from data filled in by your operator. You can therefore create a formula in the hour widget.

1.1. Description of the feature

The formulas to insert in your hour widget will be:

  • Hours: ## tag_heure ## + hours (Number of hours desired)
  • Minutes: ## tag_heure ## + minutes (Number of minutes desired)

1.2. In practice, how to do calculations on hours ?

Context: Let us imagine an operator filling a time on a form. We want to add one hour at the time filled by the operator.

1. Drag and drop a first Hour widget in your form.

2. Name this widget "Time of first check". Check the "Input time" option.

image

3. Drag and drop a second Hour widget. Name the "Time of second check".

4. In the settings, click on "formula".

5. Copy and paste the tag of the first-hour widget. Add the number of hours or minutes. Here, we just add an hour.

image

6. On the form, we see that an hour has been added.

image

It is also possible to perform calculations on dates.

2. Retrieve data from the hour widget

It's possible to extract the hour or minutes from an hour widget, using tags.

Here are the tags and their specific features:

##taghour:hours##

##taghour:minutes##

2.1. Purpose

To retrieve the "minutes" value from an hour widget.

  • Drag and drop an hour widget into the form.
  • Drag and drop a text widget.
  • Copy the tag of the hour widget into the default value of the Text widget, adding "minutes" before the ##.
  • You should have a default value as following: ##hour_xpkG3XOG:minutes##
image
image