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
- You can specify letters in the Letters (tdsmi1150m000) session.
- You can specify selection expression in the Selections (tdsmi0170m000) session.
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:
Normal text
For example, "We are excited...". You can use special characters like ö or é but it is not possible to use print effects such as bold, underscore, and different fonts.Table fields
You can use all table fields recorded in the Tables to be Displayed in CRM (tdsmi0182m000) session, such as tccom100.nama (the business partner's name).Attributes
You can use all attributes recorded in the Attributes (tdsmi0550m000) session. For more information, refer to CRM – attributes in the Text Editor.Predefined variables
For example, @today (gives current date). For more information, refer to CRM – predefined variables in the Text Editor.
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
menu of the Text Editor, click to retrieve the required table fields or attributes.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 functions | Example | |
---|---|---|
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 A | val ("8.7") = 8.7 |
abs (X) | calculates absolute value of X | abs (-10.3) = 10.3 |
int (X) | produces integer value of X | int (11.6) = 11 |
pow (X, Y) | raises X to the power of Y | pow (10.2) = 100 |
sqrt (X) | produces square root of X | sqrt (16) = 4 |
min (X, Y) | produces smallest value of X and Y | min (6, 10) = 6 |
max (X, Y) | produces largest value of X and Y | max (6, 10) = 10 |
pi | constant 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 functions | Example | |
---|---|---|
edit (X,Y) | formats numeric value X according to format Y | edit (10.3, "ZZZ9V,99") = " 10,30" |
str (X) | puts numeric value in string | str (10.3) = "10.3" |
len (X) | produces length of string X | len ("abc") = 3 |
strip (X) | deletes spaces after last character | strip ("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 functions | Example | |
---|---|---|
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 |