Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Home
  • FAQs
  • Glossary
  • Contact

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
      • Getting Started with OPUS
      • How does OPUS work?
      • Mobile App : Installing the OPUS4business mobile app
      • Web : Login and use OPUS web dashboard
      • Web : Clear browser cache
  • Mobile app
      • Mobile App : OPUS4business overview
      • Mobile App : OPUS4managers overview
      • Mobile App : OPUSmedia overview
    • OPUS4business app
        • Mobile App : OPUS4business overview
        • Mobile App : Installing the OPUS4business mobile app
        • Mobile App : Navigating the OPUS4business App
        • Mobile App : Starting a New Job
        • Mobile App : Job History
        • Mobile App : Job actions in OPUS4business
    • OPUS4managers app
        • Mobile App : OPUS4managers overview
    • OPUSmedia app
        • Mobile App : OPUSmedia overview
  • Web Dashboard
      • Web : Clear browser cache
      • Web : Login and use OPUS web dashboard
    • Web Dashboard Elements
        • Web : Use OPUS web, quick start guide
      • Overview
      • Reports & Dashboards
      • Alerts
          • Web : Alerts
      • Jobs
          • Web : Jobs - Checklists
          • Web : Job - Checklist Details
          • Web : Create a new job in OPUS web dashboard
          • Web : Reassign jobs in OPUS web dashboard
      • Job Schedule
      • Projects
      • Sites
          • Web : Sites
      • Operators
          • Web : Operators
      • Activities
      • Notifications
          • Web : Notifications
      • Stock
    • ODMS Dashboard
        • ODMS : Use OPUS web, quick start guide
        • ODMS : Overview
        • ODMS : Reports
        • ODMS : Alerts
        • ODMS : Jobs - Checklists
        • ODMS : Job - Checklist Details
        • ODMS : Operators
        • ODMS : Restaurants
        • ODMS : Notifications
        • ODMS : Users (Devices)
        • ODMS : Staff and Products (Items)
  • Administration
      • Admin : Manage Company Details
      • Admin : Manage Logos
    • Manage Users
        • Admin : Add new users
        • Admin : Create a new user with site roles linked
    • Manage Teams
    • Manage Tags
    • Manage Site Roles
    • Manage Projects
    • Manage Items
      • Manage Item Categories
    • Manage Report Categories
  • Checklist Setup and Workflows
    • Checklists
        • OPUS Best Practice Model for Checklists
        • Checklist Template
      • Checklist Questions
          • Rich Text Markup Formatting of Question Text
        • Checklist Question Types
            • Question Type : Advanced Calculation
    • Workflows
  • Import Sheets
      • Import Sheets : Overview
      • How-to : Bulk import sites
      • How-to : Bulk import users
      • How-to : Bulk import site role links
      • How-to : Bulk import site panels
      • How-to : Bulk import projects
      • How-to : Bulk import jobs
      • How-to : Bulk import items
      • How-to : Bulk import item intake
      • How-to : Bulk import item categories and sub categories
      • How-to : Bulk import Promotions Item Tracking and Implementation
  • Whats New
      • OPUS Release Notes - August 2024 Patch
      • OPUS Release Notes - July 2024 Release
      • OPUS Release Notes - March 2024 Release
      • OPUS Release Notes - January 2024 Release
  • External API
      • OPUS External API

Question Type : Advanced Calculation

  • Updated on July 27th, 2024
  • 14 Minute to read
  • Print
  • Share
  • Dark
    Light

This document provides guidelines for implementing and using advanced calculation question types in OPUS checklists. This question type does not accept direct inputs but displays a calculated result based on other question answers within the same checklist.

General Specification

Referencing Questions

Reference Naming: Questions used in calculations should have a specific reference name using the "reference" property.

Naming Convention: Use full words in lowercase, separated by underscores (_).

Example: For a section "Employee" and question "Enter first name of employee", the reference should be: 

employee_firstname

 

Regular Functions

Formula Storage: The formula for the calculation is stored in the "function" property.

Reference Syntax: Use square brackets [] to include reference names in formulas.

Example:  For questions with references "001", "002", and "003":

([001] + [002]) * [003]

 

Special Functions

  • DATEDIF Function: Used for calculating the difference between two dates.
  • Example: For date references "001" and "002", and number reference "003":

 

App Specific Changes

UX

Unanswered References: If referenced questions are unanswered, display the calculated question as unanswered with a prompt indicating waiting for inputs.

Answered References: Display the calculated result inside a box when all referenced questions are answered.

On Input

Dynamic Calculation: Recalculate and update the result whenever an answer to a referenced question is saved.

Nested Calculations: Allow one level deep nesting of calculated questions during checklist creation.

Making Answers Available for Calculation

Return Types: Implement a function to return values in appropriate types based on question type (e.g., DateTimeOffset for dates, decimal for numbers).


 

Special Calculation Functions

DATEDIF

Purpose: Calculate the difference between two dates in various units (years, months, days, hours, minutes, seconds).

Syntax: 

datedif(start_date, end_date, unit)

Units:

"years"

"months"

"days"

"hours"

"minutes"

"seconds"

Example:

datedif([start_date], [end_date], 'hours')

 


Implementation Example

Question Definitions

Date Input:

Reference: employee_start_date

Number Input:

Reference: employee_years_of_service

Calculated Question:

Reference: total_service_years 
Function: datedif([employee_start_date], today(), 'years') 
		+ [employee_years_of_service]

 

checklists advanced

Featured articles

  1. Mobile App : Installing the OPUS4business mobile app
  2. Getting Started with OPUS
  3. Web : Use OPUS web, quick start guide
  4. Web : Login and use OPUS web dashboard
  5. How-to : Bulk import jobs
  6. Opus Glossary

Was this article helpful?

Yes
No

Table of Contents

General Specification Referencing Questions Regular Functions Special Functions App Specific Changes UX On Input Making Answers Available for Calculation Special Calculation Functions DATEDIF Implementation Example Question Definitions
OPUS
The OPUS solution is a digital operating platform that allows teams in the field to easily collect data and manage jobs and tasks.
Quick Links
  • About
  • Pricing
  • Contact us
Platform
  • Features
  • Solutions
  • Request A Demo
Support
  • Help Center
  • FAQ
Existing Users
Login
Connect With Us
Sales and Support
  • +27 (87) 135 9800
  • support@opus4business.com
  • Terms of Services
  • Privacy Policy
Copyright © AP.POINT. All Rights Reserved

Knowledge Base Software powered by Helpjuice

Expand