CRM – Text Editor

If you create a letter or a selection expression, you can use the Text Editor to specify the actual layout of the letter or to specify an expression.

Note
Using the text editor

The layout of a letter or a selection expression can be very simple or quite complex. It can contain the following data:

It is recommended that you zoom and select table fields and attributes rather than entering them, because you are less likely to make mistakes by selecting them. On the Options menu of the Text Editor, click Start Zoomsession to retrieve the required table fields or attributes.

Note

Any text that you type after the pipe ( | ) symbol is not used as programming code, but is merely used as additional information for the user.

Operators in the Text Editor

You can use arithmetic, logical, or relational operators in the Text Editor.

Arithmetic operators
*multiplication
/division
+addition
-subtraction
¥remainder after division
&linking strings (alphanumerical arrays)

 

Logical operators
or
and
not (negation)

 

Relational operators
=equal to
<>unequal to
>greater than
<less than
>=greater than or equal to
<=less than or equal to

 

Functions in the Text Editor

You can use the following functions in the Text Editor:

  • Arithmetic
  • Trigonometric
  • Logarithmic
  • String
  • Date
Arithmetic functionsExample
round (X,Y,Z)

produces rounded value of X

Y is number of decimals

Z is rounding method (0 = down, 1 = normal, 2 = up)

-
val (A)produces numeric value of string Aval ("8.7") = 8.7
abs (X)calculates absolute value of Xabs (-10.3) = 10.3
int (X)produces integer value of Xint (11.6) = 11
pow (X, Y)raises X to the power of Ypow (10.2) = 100
sqrt (X)produces square root of Xsqrt (16) = 4
min (X, Y)produces smallest value of X and Ymin (6, 10) = 6
max (X, Y)produces largest value of X and Ymax (6, 10) = 10
piconstant with value pi (3.1415926)-

 

Trigonometric functions
sin (X), cos (X), tan (X)produces sine, cosine, or tangent of X
asin (X), acos (X), atan (X)produces arc sine, cosine, or tangent of X
hsin (X), hcos (X), htan (X)produces hyperbolic sine, cosine, or tangent of X

 

Logarithmic functions
exp (X)raises e to the power of X
log (X)produces natural logarithm of X on the basis of e
log10 (X)produces logarithmic value of X on the basis of powers of 10

 

String functionsExample
edit (X,Y)formats numeric value X according to format Yedit (10.3, "ZZZ9V,99") = " 10,30"
str (X)puts numeric value in stringstr (10.3) = "10.3"
len (X)produces length of string Xlen ("abc") = 3
strip (X)deletes spaces after last characterstrip ("A ") = "A"
pos (X,Y)produces position of string Y in string X from left-
rpos (X,Y)produces position of string Y in string X from right-

 

Date functionsExample
date ()produces current date-
date (YYYY, MM, DD)produces date according to specified year (YYYY), month (MM), and day (DD)date (2008, 5, 1) = 1 May 2008