Calculating Time with 15 Minute Increments

Have more questions? Submit a request

If your business bills by increments of 15 minutes, there are a few workarounds for automating this for your users.

Table of Contents

Solution Using Reference Data

Solution Using an Increment Field

Solution Using Reference Data

Format the Reference Data File

Although this solution requires some setup in Google Sheets or Excel, it is the simplest solution of the two. First, we need to establish the essential basics of why this solution works. There are limited field types that accept Reference Data. Although we are calculating with time, we cannot power a Time field with reference data. Therefore, we need to convert integers to their time equivalent in the reference data. That will look something like this:

15 Minute Increments_Reference Data.png

The spreadsheet above establishes that the Parent Field is a drop down menu containing the three potential options for fifteen (15) minute increments. The field that will auto-populate based on the option in the drop down will be a number purely used in the calculation and therefore can be "hidden" to reduce confusion on the mobile side.

Translated to integers:

  • 15 minutes is 25% of an hour, i.e. 0.25,
  • 30 minutes is 50% of an hour, i.e. 0.50,
  • 45 minutes is 75% of an hour, i.e. 0.75. 

Upload the Reference Data File

Now that the reference data file is created, it needs to be uploaded to the GoCanvas portal and those instructions can be found in the Help Center article, "Upload a Google Sheet as Reference Data" or "Uploading Reference Data when using the Builder."

Setup the Form Fields

Next, we need to setup the fields in the form.

  1. Navigate to the Forms page and edit an existing form or Create New: Mobile Form.
  2. Locate the Screen where these fields will go or Add Screen.
  3. Add a Number field, either with click to add, drag and drop, or click Add Field to use Smart Fields. This should be a Number field in the style of Number that does not allow decimals. This will be where the user will input the number of hours they worked as an integer.
  4. The second field will be a Single Choice field in the style of Drop Down. This will be the field where the user selects 15, 30, or 45 minutes, if needed.
  5. While the drop down field is still highlighted, expand Reference Data in the Settings panel on the left. For a refresher on mapping fields, please refer to the Help Center article, "Map Reference Data to your Fields in the Builder."
    • The first drop down, Reference Data File will be the file we just made and uploaded. In this example, the file is called, "Calculate Time in Increments of 15 Minutes."
    • The Reference Column in our example will be the "Drop Down" column. The Parent Field only requires these two drop down menus so this field is complete.15 Minute Increments_Drop Down Field_Reference Data.png
  6. The third field will be another number field in the style of number, but needs to allow for 2 decimal places. Expand the Advanced menu, click the Decimal Places drop down and select 2 and toggle Mobile Visible off.
  7. While the number field is still highlighted, expand Reference Data.
    • The Reference Data File will be the same file as above,
    • The Reference Column will be "Hidden Number,"
    • The Reference Screen will be the screen where the parent field is located,
    • The Reference Field will be the parent field.15 Minute Increments_Number Field_Reference Data.png
  8. The final field will be a Calculation field in the format of HH:MM.
    • Expand Calculation in the left Settings panel. The first drop down will be the first number field, where the user inputs the amount of hours worked,
    • Leave the function as + (addition).
    • The second drop down will be the "Hidden Number."15 Minute Increments_Calculation Field_Calculation.png

This solution is now complete. Below is how the fields look in the center workspace for this example but it is encouraged to label your fields in the way that makes the most sense for your users.

15 Minute Increments_Solution Using Reference Data_Fields.png

And here is what these fields will look like on mobile:

15 Minute Increments_Reference Data Solution_Mobile.gif

Solution Using an Increment Field

This solution is more interactive for users but the setup is slightly more complicated and requires more explanation on the screen for the user so they understand how to interact with the fields accurately. The entire solution can be done from within the GoCanvas Builder, so there is less switching tabs required of the person building the form.

  1. Navigate to the Forms page and edit an existing form or Create New: Mobile Form.
  2. Locate the Screen where these fields will go or Add Screen.
  3. Add a Number field, either with click to add, drag and drop, or click Add Field to use Smart Fields. This should be a Number field in the style of Number that does not allow decimals. This will be where the user will input the number of hours they worked as an integer.
  4. The second field is a number field in the style of Increment. Set the Maximum to 3, equal to the amount of options we had above: 15 minutes, 30 minutes, and 45 minutes.15 Minute Increments_Increment Field_Settings.png
  5. The third field is a Static Text field where we can clarify how to use the Increment field. The text of this field needs to explain how to use the Increment field above. Note, the second and third fields can be flipped, if the admin prefers the instructions for the Increment field to be before the field itself. Flipping these two fields will not affect functionality.15 Minute Increments_Static Text Field_Settings.png
  6. Fields four, five, and six are the numbers that will be used in the calculation, since the Increment field does not equate to the numbers necessary for the calculation. Add three Time fields in the style of MM:SS. For ease of building, one field can be setup then copied twice. Make sure to return to each copied field to update the Custom Time and Condition Value for the second and third fields, as those are the only settings that will differ.
    • The first time field will represent 15 minutes. Change the Default setting to Custom Time and add "15:00" to the Custom Time setting.
      • Expand Conditions and click Add Condition. Expand the Field drop down, select the screen where the Increment field is located and then the name of the Increment field. The Condition is = (Equal) and the Value is 1.
      • Expand Advanced and toggle Mobile Visible off.
    • The second time field will represent 30 minutes. Change the Default setting to Custom Time and add "30:00" to the Custom Time setting.
      • Expand Conditions and click Add Condition. Expand the Field drop down, select the screen where the Increment field is located and then the name of the Increment field. The Condition is = (Equal) and the Value is 2.
      • Expand Advanced and toggle Mobile Visible off.
    • The third time field will represent 45 minutes. Change the Default setting to Custom Time and add "45:00" to the Custom Time setting.
      • Expand Conditions and click Add Condition. Expand the Field drop down, select the screen where the Increment field is located and then the name of the Increment field. The Condition is = (Equal) and the Value is 3.
      • Expand Advanced and toggle Mobile Visible off.
    • Here is what the settings will look like for the field representing 15 minutes, the other two will look similar save for the Custom Time and the Condition Value as mentioned above.

      15 Minute Increments_Time Fields_Settings.png

  7. The final field will be a Calculation field in the format of HH:MM.
    • Expand Calculation in the left Settings panel.
      • The first drop down will be the first number field, where the user inputs the amount of hours worked,
      • Leave the function as + (addition).
      • The second drop down will be the 15 minute field.
      • Click Add Value and leave the function as + (addition).
      • The third drop down will be the 30 minute field.
      • Click Add Value and leave the function as + (addition).
      • The fourth drop down will be the 45 minute field.
    • Remember that all potential options must be included in this calculation for this solution to work but only the number triggered by the condition will be ultimately included in the final calculated time.

This solution is now complete. Below is how the fields look in the center workspace for this example but it is encouraged to label your fields in the way that makes the most sense for your users.

15 Minute Increments_Solution Using Increments_Fields.png

And here is what these fields will look like on mobile:

15 Minute Increments_Increment Field Solution_Mobile.gif

Did we answer your question?

We'd really appreciate your feedback! Please leave your suggestions for improvement in the comments or let us know what you're looking for so we can assist you better. We want to help, but we need to understand your needs!

Articles in this section

Share

Comments

0 comments

Please sign in to leave a comment.