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
AI and Code Checking in Editors
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.21
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
- Calculations & Functions /
- AI and Code Checking in Editors
AI and Code Checking in Editors
As of version 5.21, every editor in which a consultant writes code has the same buttons below it: Check code and Format. On an installation with AI enabled, an administrator also sees the Ask AI button, which opens an AI chat connected to that specific editor. The AI then writes, modifies or explains the code and always shows you the change for comparison first. This article describes both features using a task calculation as the example. They work the same way in the other editors.
Where to find the buttons
| Editor | Where to open it |
|---|---|
| Task calculations | Template → task → Calculations tab, below each calculation section. |
| Global scripts | Administration → Scripts: calculation scripts, Case Overview scripts and React scripts. |
| Service Console | Administration → Service Console. |
| Authentication method script | Administration → Authentication → method detail. |
| Dynamic conditions | Task dynamic conditions window: the script tab and the script block in the condition builder. |
| Dynamic rows and dynamic items | Detail of a variable of the given type, script section. |
| Prints | Template → Print: standard (HTML) print, React print and custom script in the print builder. |
Check code
The check runs on the server, so the editor and the server agree on what is wrong in the code. The code is not executed and nothing is saved during the check.

- Click Check code. While the check is running, the button reads “Checking…”.
- If the code is fine, a No issues badge appears with the message “The code compiles, lint reports no issues and all asynchronous calls are awaited.”
- If the check finds something, a badge with the number of issues appears (“1 to review”), the problem spots are underlined in the editor and a list is shown below the editor. Each item contains the issue text, the line and column, and the rule identifier. Click an item to jump to its line.
| What the check reports | Example |
|---|---|
| Syntax errors (in red) | A missing bracket, a typo in a keyword. Such code cannot be compiled and will not run. |
Missing await (rule calculation/missing-await) | vars['Reimbursement'].setValue(...) without await. Without it, the variable may receive an unfinished operation instead of the result. See the article How and when calculations run. |
Incorrect use of the result of an asynchronous call (calculation/promise-misuse) | dt.from('Rates').get(): a method is called on the result of dt.from before it is available. |
Type errors (calculation/type-error) | A method or property that the calculation interface does not have, for example the assignment proc.IPROC_DESCRIPTION = … instead of await proc.setAttribute(…). |
| Linter findings | Style recommendations and suspicious code, for example let for a variable that never changes (lint/style/useConst), or comparison with == instead of === (lint/suspicious/noDoubleEquals). These are the same rules the TAS developers use. |
Format
The Format button normalizes indentation, spacing and line breaks according to a consistent style and puts the result back into the editor. You must save it yourself. If the code is already formatted, TAS reports “The code is already formatted.” Code that cannot be parsed because of a syntax error is left unchanged. Text inside multi-line strings (template literals) is not changed.
Ask AI
The Ask AI button opens an AI chat connected to the editor. The AI knows what code it is dealing with, when it runs and what it should return, and it reads whatever it needs for the job on its own: for a calculation, the template variables and the task’s other calculations; for a print, its content; for dynamic conditions, the form fields; for a dynamic table, its columns; for a shared script, whatever depends on it. The AI checks the proposed code itself before handing it over.
A user with the $Administrator role (or a superadministrator) on an installation that has AI enabled. The button is only shown for a saved object: for example, a task calculation that already has an ID.
The AI reads the code from the database, not from the editor. Before you ask, click Save; otherwise the AI works with an older version of the code.
How to have the AI modify code
- Save the task (template, script, print).
- Below the editor, click Ask AI. The AI chat opens. The header shows the editor badge (for a calculation, for example, Calculation box 1) and the prompt field is prefilled with “Modify this code so that…”.
- Complete the sentence, for example “…it waits for the value to be saved and rounds the result to two decimal places”, and send it.
- When the AI has prepared the code, the Review generated code window opens.
- Go through the differences and click Use generated code. The code is inserted into the editor.
- Click Check code and then Save.


| Window element | Purpose |
|---|---|
| Notes | Text below the heading: what the AI changed and what to watch out for. |
| Current | The code currently in the editor. Removed parts are shown in red. |
| Generated | The proposed code. Added parts are shown in green. |
| Use generated code | Replaces the editor content with the proposed code. Nothing is saved yet. |
| Cancel | Closes the window; the code in the editor does not change. |
The conversation continues, so you write the next change as a follow-up message (“also handle the case where the supplier is missing”). Each change again arrives as a proposal for comparison. The AI never writes anything to the database on its own.
Explaining existing code
In the same chat you can ask about the code, for example “Explain what this calculation does and when it runs”. The AI answers in the chat: it describes what the code reads and where it writes, shows an example calculation and tells you at which trigger point it runs. The code in the editor does not change.

Connecting the chat to the editor
As long as the editor badge is shown in the chat header, the chat works with that editor. The Builder mode cannot be selected during that time. Remove the badge with the cross; the chat then works as a regular AI chat.
The AI can make mistakes. Read the proposed code, check it with the Check code button and test it on a test case.
TypeScript in calculations
As of version 5.21, calculations, global calculation scripts and the Service Console use TypeScript. The editor suggests the actual names and parameters of the calculation interface methods. You do not have to write type annotations; plain JavaScript is valid TypeScript. TAS no longer adds await for you: you must mark every asynchronous call yourself. What this means in practice is described in the article How and when calculations run.
Dynamic items
In the table designer of a Dynamic Items variable, the toolbar above the column list also contains an Ask AI button. The chat opens with the text “Modify this table so that…” and the AI proposes a change to the columns and table settings, which you again compare and confirm first. For details, see the article on the Dynamic Items variable. The dynamic items script has the Check code, Format and Ask AI buttons like the other editors.
Related: Task calculations; How and when calculations run; Global scripts and React scripts; AI chat; Creating a template: manually, with AI Builder, by import or from a diagram.