This article is an announcement of new functionality.
We do not recommend that you use this article to learn the new functionality.
A full description of the new functionality will be provided in the documentation for the appropriate version.
For a complete list of changes in the new version, see the v8Update.htm file.
Planned for version 8.3.20
When we create queries or reports, we often need not only to show the data as it is in the database but also to perform some operations on it. For example, to calculate the difference between two dates or round up a number to the required number of digits. We are lucky, if the function we need is implemented in query language (or in DCS language). So we can do what we want with the data at the query/DCS level, and then just display the result. If the required function is not implemented in query language, we have to post-process the query in 1C language, looping through the query results and performing the necessary operations. This makes the configuration code larger and can decrease performance.
Developers often ask us to add additional functions to query language and DCS language. We have carefully analyzed their suggestions and drawn up a list of the most popular functions that we are planning to implement in version 8.3.20.
Query language
New query language functions:
-
String. Converts a primitive value to a string based on locale settings.
-
Trigonometric functions Sin, Cos, Tan, ASin, ACos, and ATan. All calculations are made in radians.
-
Exp. Calculates the result of raising the base of the natural logarithm (e) to the power.
-
Log. Calculates the natural logarithm of a number.
-
Log10. Calculates the decimal logarithm of a number.
-
Pow. Calculates exponentiation.
-
Sqrt. Сalculates the square root.
-
Round. Rounds a number to the required number of digits.
-
Int. Calculates the integer part of the passed number, cutting off the fractional part.
-
StringLength. Calculates the string length.
-
TrimL. Discards insignificant spaces on the left.
-
TrimR. Discards insignificant spaces on the right.
-
TrimAll. Discards insignificant spaces on the left and right.
-
Left. Gets the first characters from the left of the string.
-
Right. Gets the first characters from the right of the string.
-
StrFind. Finds the first position of a substring in a string (case insensitive).
-
Upper. Converts all characters in a string to uppercase.
-
Lower. Converts all characters in a string to lowercase.
-
StrReplace. Replaces all occurrences of a substring with another substring (case insensitive).
-
StoredDataSize. Returns the size of the parameter data in bytes.
Data composition system
New functions in Data Composition System expression language:
-
TrimL. Discards insignificant spaces on the left.
-
TrimR. Discards insignificant spaces on the right.
-
TrimAll. Discards insignificant spaces on the left and right.
-
Left. Gets the first characters from the left of the string.
-
Right. Gets the first characters from the right of the string.
-
StrFind. Finds a substring in a string (case insensitive).
-
Upper. Converts all characters in a string to uppercase.
-
Lower. Converts all characters in a string to lowercase.
-
StrReplace. Replaces all occurrences of a substring with another substring (case insensitive).
-
NStr. Gets a string in the user language (similar to the NStr global context method). Parameters:
-
InitialString. A string that contains strings in different languages (for example, "ru = 'Добрый вечер!'; en = 'Good evening!'").
-
LanguageCode. A string with the code of the language in which to get the string. If not specified, the string is obtained in the current user language.