User guide
Quick Start Guide
Case notes
Table component
FAQ
Search
Dashboard
Deleted Documents and Access Log
Solving a task
AI Assistant
Manuals
Substitution and Vacation
Suspending, resuming, archiving and deleting a case
Case variables, history and graph
Basic Terms
Uploading Documents, Folders and Revisions
News
Favorites
Navigating the interface
Dashboard widgets
Case Detail
News/Announcements in Team assistant
Case list
Logging In and Out
Account Settings
Task List
Mobile app settings
Reports and Charts
Searching and Listing Documents
Handing Over, Taking Over and Tasks to Pull
Bulk Tasks
Printing a Case
Creating and Editing an Overview
What Is TAS
Form Fields
Tablet Interface and NFC
Overviews
Creating a New Case
Case Events
Case Permissions
Subscribing to an overview by email
Administrator Guide
Platform guide
Administration
Crons
Authentication and Synchronization
SMTP OAuth authentication
LDAP, SAML, Entra ID and NFC: Settings
Configuring authentication modules
Authentication
Vault
DMS attributes
Service Operations
Mobile App Setup for Your Environment
Scheme
XML Process Import
HR agenda and agenda handover
Logs
Archiving
Scripts
Sequences
System Status
News Management
Migrations
Configuration
Plugins
Email Queue
Service Console
AI monitoring
Shared Files
Settings
CSP Headers
CSV Files
Scheduled Tasks
Processing Queues
Maintenance
Administration Menu
Licenses
Dynamic Tables
Usage Statistics
Access Token Settings & Session Expiration
Visual Identity
Template
Prints
Tasks
Task calculations
Automatic task completion and cancellation
Email Task and Notifications
Task types
Smart Event task
Instructions, Sections and Testing a Task
General task settings and solver
Multi-instance
Planning: start, branching and due date
Dynamic conditions: builder
Variable assignment and sections
Variables
Class diagram, object state import and alias candidates
Document list
Text and Multiline text
Checkbox
Number
Variables: overview and common settings
Lists (texts, numbers, dates)
Dynamic Rows
Date
Dynamic list
Sequence
Dynamic Table
Shredding Process
Template graph
Template Tab
Template List
Importing, Exporting and Copying a Template
Template Headers
Case statuses
Roles
Connecting to a different database
Diagnosing services
Hyper-V: Isolated NAT Network with Port Forwarding
Users
Translations
NFC Integration
Events and Rules
AXIOS API
Plans
Axios with Vault
Users
Axios with SSL Certificate
User Detail
Calculations & Functions
Form condition
Other dynamic conditions
Optimization of API calls on dynamic conditions
Filtering in a dynamic sheet using dynamic conditions
Dynamic Conditions: Script
Dynamic Rows: Script
Calculations
Dynamic Tables
Printing and File Generation
Documents in Calculations — Complete Guide
Printing and File Generation in Calculations
DOCX document creation
Other Calculations
How and when calculations run
Calculations API reference: the lib library
Calculations API reference: variables and case
Global Scripts and React Scripts
Integrations
MS Graph
MS Graph - cron configuration
MS Graph v2 (from v5.7.102)
MS Graph - preparing the mailbox
MS Graph (email)
ISDOC.PDF
DocuSign
TAS call module - TAS 2 TAS (process creation via API)
DB View
DocuSign and electronic signatures
ERP and other integrations
Smart Events for Integrations
TAS Forms
TAS Forms
Activating the module on the environment
TAS Forms - secret creation guide for Docker Swarm
Advanced Features & Tips
Filtering in a dynamic sheet using a URL parameter (static)
Optimizing Overviews with a Large Number of Cases
API Documentation
Product
Technical Changelog
Business Changelog
Version Upgrade Guide
Upgrade to v5.19
Upgrade to TAS 5.19 - Key Changes and Removed Features
Upgrading TAS 5.17 to 5.19 – Technical Part (DevOps)
Upgrate to v5.17
Upgrade to TAS 5.17 - Key Changes and Removed Features
Asset Migration from FE to Backend (5.17 Upgrade) — DevOps
Upgrading to v5.7
Lodash upgrade v4.17.x (>v5.5)
Main changes and deprecated features (v5.3 > v5.7)
Highlighting variables in Read-only status (>v5.7.58)
Upgrading to 5.3
Dynamic conditions migration
PDF printing adjustment
Editing Task Description vs Task Instructions
Transpiling forEach to a for loop
Rendering HTML on Caseoverview
Differences between TAS4 and TAS5 - a complete overview
Best Practices for Upgrading from v4 to v5
Using validation functions
Technical details
Server prerequisites
Security and Data Protection
Security
TAS Operations Runbook
Technological architecture
News / Important information
Microsoft Disabling Basic Auth for SMTP
End of EWS support and transition to Microsoft Graph
Adjustment in EWS after MS Exchange update (29.04.2025)
Security notices
Getting Started
- All Categories /
- Administrator Guide
- Platform guide
- Template
- Tasks /
- Task calculations
Task calculations
The Calculations tab in the task editor holds scripts that run on the server at set points in a task's life: on start, at the end, on recalculation, manually and before takeover. Calculations read and write case variables, change task data and call system functions. Every task type has this tab. For an automatic task, the calculation is its only work. The number on the tab shows how many calculation sections there are.
This article describes how to set up task calculations and when they run. The functions you can call in calculations are described in the Calculations and scripts section.

| No. | Element | Purpose |
|---|---|---|
| 1 | All | Shows all calculation sections. The number in brackets is how many there are. |
| 2 | Active calculation sections | Shows only sections that have at least one run point checked. |
| 3 | Inactive calculation sections | Shows only sections that do not run. |
| 4 | Create variable | Creates a new template variable without leaving the task. |
| 5 | Expand all / Collapse all | Expands or collapses all sections. |
| 6 | Active | Section switch. It can only be turned off: turning it off clears all run points. It turns on by itself when you check a run point. |
| 7 | On start | The calculation runs when the task starts. |
| 8 | At the end | The calculation runs when the task is completed. |
| 9 | On recalculation | The calculation runs when the solver chooses Recalculate in the task. |
| 10 | Manually | The calculation runs when a user opens a waiting Event task in the case's Event window. |
| 11 | Before takeover | The calculation runs just before the task is offered for takeover. |
| 12 | Collapse / expand | Collapses or expands this section. |
| 13 | Copy | Inserts a copy of the section directly below it. |
| 14 | Remove | Deletes the section without confirmation. The change takes effect when you save the task. |
| 15 | Move | Drag the icon to change the order of the section. |
| 16 | Insert variable | Inserts an expression at the cursor that reads a template variable or a system value of the task or case. |
| 17 | Scripts | Calculation scripts from administration that are attached to this section. You can then call their functions in the code. The script label opens its detail. |
| 18 | Source | The calculation code as you write it. |
| 19 | ES6 syntax | The code the server generated from your source, which is what actually runs. The tab becomes active only after saving. |
| 20 | Help | Opens the help for calculations. |
| 21 | Full screen | Opens the code in the full-screen Calculation code window. |
| 22 | Add calculation section | Adds a new section. The new section stays inactive until you check a run point. |
When calculations run
| Run point | Exactly when |
|---|---|
| On start | When the task is activated. For a user task, after the solver is determined. For an email notification, before the email is sent, so the calculation can adjust the values used in the email. For a Smart Event, after it has been executed, so the calculation can process the result. For an external event trigger, before the event is invoked. For a subprocess, before the child case is created. For an event, when it starts waiting. |
| At the end | When the task is completed, for all types including automatic ones. |
| On recalculation | When the solver chooses Recalculate in the task's More menu. The form is saved first. The item is active only when the task has such a calculation. |
| Manually | When a user opens a waiting Event task in the Event window in the case detail, before its variables are displayed. |
| Before takeover | When the task becomes a task for takeover, before it is offered to users and notifications are sent. |
Within one run point, sections run in the order they appear on the tab. If a calculation ends with an error, the action that triggered it is not completed and the user gets an error message. When debugging, save and test on a test case.
Code and attached scripts
You write the code on the Source tab. The editor suggests template variable names and functions from the available libraries. You read and write variables through the vars object, for example:
const dep = vars['departureDate'].getValue();
vars['travelAllowance'].setValue(days * 600);After saving, the server generates the code on the ES6 syntax tab from the source, and that code is what runs. The code of attached scripts is inserted before the section code, so their functions are available in the section.
You can edit the ES6 syntax tab. The editor asks first and allows the change only after you type ES6 in the confirmation field. After saving, the edited code replaces your source.

The Insert variable field offers template variables and system values of the task and case, for example the task name and comment, due date, solver, case name, status and owner, or a link to the case. An expression that reads the value is inserted into the code.
Example: travel allowance calculation
The automatic task Calculate travel allowance in the sample template “Travel request” has one section with the On start run point. It calculates the number of days of the trip from the departure and return dates and stores CZK 600 per day in the Travel allowance variable. In a test run with a three-day trip, the calculation stored CZK 1,800 and the task was completed immediately.
The Fill in the travel request task has an On start calculation that fills the Traveller variable with the case owner if it is empty.
How to add a calculation
- Open the task and click the Calculations tab.
- Click Add calculation section.
- Check the point when the calculation should run, for example On start.
- Write the code in the editor. Insert variables using the Insert variable field.
- If you need functions from a shared script, select it in the Scripts field.
- Click Save.
Related: Task types, Dynamic conditions: builder, Calculations and scripts section.