User guide
Quick Start Guide
Dashboard
Overviews
Case detail (Caseoverview)
Case - event
Tasks
Case notes
Documents
User settings
Favorites
Table component
FAQ
Administrator Guide
Platform guide
Administration
Crons
Authentication and Synchronization
Mobile App Setup for Your Environment
Scheme
Dynamic tables
Archiving
Scripts
Service console
Scheduled Tasks
HR Agenda
Sequences
CSP Headers
Logs
Access Token Settings & Session Expiration
Template
Roles
Planning
Users
Organizational structure
Events
Translations
AXIOS API
Calculations & Functions
Integrations
TAS Forms
TAS Forms
Activating the module on the environment
TAS Forms - secret creation guide for Docker Swarm
Advanced Features & Tips
Partners
Product
Business Changelog
Technical Changelog
Version Upgrade Guide
Upgrading to 5.9
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
Upgrading to 5.7
Lodash upgrade v4.17.x (>v5.5)
Main changes and deprecated features (v5.3 > v5.7)
Using validation functions
Differences between TAS4 and TAS5 - a complete overview
Best Practices for Upgrading from v4 to v5
Technical details
News / Important information
- All Categories /
- Product
- Version Upgrade Guide
- Upgrading to 5.7 /
- Main changes and deprecated features (v5.3 > v5.7)
Main changes and deprecated features (v5.3 > v5.7)
Main changes
Scripting adjustments for Progress
In TAS 5.7 we are working with users with the Display Name parameter. For this reason, it is also necessary to modify the scripts that plot the process progress on the Case Overview or on tasks (Progress). The scripts can be taken from the New Origin instance (if you have access) or contact support.
Adjustment in the behavior of hidden columns in the Dynamic Rows
Within the DR, a change was made so that by default the value of hidden columns is transferred when copying. The original behavior was that the value was not transferred.
The setting can be adjusted in the column definition for the DŘ using the "copy" parameter.
Using LoggedUserStore on dynamic conditions
In case of using LoggedUserStore and expecting userNickName in the returned object, the parameter has changed. Currently, from v5.7, instead of the userNickName parameter, use userName
const LoggedUserStore = Require.stores.LoggedUserStore;
let {
roles,
// userNickName,
userName
} = LoggedUserStore.state;
Deprecated Functions
Due to the development of new technologies, it happens that some functions are no longer supported or are replaced by better and more secure functions. For these reasons, it is sometimes necessary to replace some functions and 100% backward compatibility cannot be maintained. Here are described the functions that need to be replaced when switching from version 5.3 to version 5.7. To find these functions in the environment, you can use one of the validation functions .
lib.dmsPdfFileToText
This function is no longer available, it has been replaced by the lib.pdfToText function.
The function currently returns all extracted content from the pdf. The consultant then has full control over the data and can use what he needs (e.g. metadata about the document).
Here is a sample example of how the function can be used to process a pdf stored in the contractCleanCopy variable:
const extractTextFromPdfJson = (pdfToJsonContent) => {
const texts = [];
proc.warn("data", {
pdfToJsonContent
})
if (!pdfToJsonContent || !Array.isArray(pdfToJsonContent.Pages)) {
return texts;
}
for (let pageIndex = 0; pageIndex < pdfToJsonContent.Pages.length; pageIndex++) {
const page = pdfToJsonContent.Pages[pageIndex];
if (!page || !Array.isArray(page.Texts)) {
continue;
}
for (let textIndex = 0; textIndex < page.Texts.length; textIndex++) {
const textObj = page.Texts[textIndex];
if (!textObj || !Array.isArray(textObj.R)) {
continue;
}
for (let r = 0; r < textObj.R.length; r++) {
const textRun = textObj.R[r];
if (textRun && typeof textRun.T === 'string') {
try {
texts.push(decodeURIComponent(textRun.T));
} catch (e) {
proc.warn("Failed to decode text:", textRun.T, e);
}
}
}
}
}
return texts;
}
const pdfToText = lib.pdfToText(vars['contractCleanCopy'].getValue()[0])
const texts = extractTextFromPdfJson(pdfToText);
const fullText = texts.join('');Alternatively, you can use the following script to process the content obtained using the lib.pdfToText function
const transformPdfToJsonResponse = (input) => {
const pages = [];
input.Pages.forEach((page, i) => {
const words = [];
page.Texts?.forEach((text) => {
text.R?.forEach((row) => {
if (row.T) {
words.push(decodeURIComponent(row.T));
}
});
});
if (words.length) {
pages.push(`--- Page ${i + 1} ---\n${words.join("")}`);
}
});
return pages.join("\n\n");
}
Updated
by Frantisek Brych