Beas Variables always string, if defined with "setvar"
Alternative is to declare variable with instance string or local string
Note: userevents always works with string declared with "setvar".
Max. length of strings: theoretical no limitation, limitation only based on windows
Strings always saved in UTF8 format.
Working with SQL Database:
if you want to use string in SQL Database fields, you must convert this with format "dbstring"
setvar=myText=Hello World
update myTable set myField=<myText,dbstring> where ...
You can set the format with
setvar=ls_text=<ls_mystring,format>
or
setvar=ls_text=<%var("ls_mystring","format1","format 2",... )>
Function  | 
Description  | 
|
|---|---|---|
<string,date>  | 
Converts string to date-format  | 
|
<string,num>  | 
Deletes thousand-dot-separator and replaces comma with dot. (for German decimal-format)  | 
|
<string,space x>  | 
Enlarges String to x chars. <abc,space 4> returns "abc ". <abc,space 2> returns "ab"  | 
|
<string,lefttrimrow xRow xLeft>  | 
Extracts row xRow and trims xLeft chars from the left. The remaining blank spaces from the right are deleted  | 
|
<string,lefttrim xLeft>  | 
Trims xLeft chars from the left and deletes blank spaces  | 
|
<string,left xLeft>  | 
Returns xLeft chars from the left  | 
|
<string,trim>  | 
Delete all space, tabs, cr_lf and char(160) from left and right site from the string and all "<P></P>" from right side  | 
|
<string,lasttoken x>  | 
  | 
|
<string,token xToken xTokensign>  | 
  | 
|
<string,right xRight>  | 
Returns xRight chars from the right of the string  | 
|
<string,len>  | 
Returns the len from string Example <hello world,len> return 11  | 
|
<string,lower>  | 
Convert string to lower string  | 
|
<string,upper>  | 
Convert string to upper string  | 
|
<string,mid pos length>  | 
Returns a part-sequence of the string Example setvar=ls_value=Hello World Returns: o  | 
|
<string,pos x>  | 
gets the position of the first appearance of the character x. x can be included in "..." x can be done with char(ascii) Example setvar=ls_test=hello<tab>world  | 
|
<string,default x>  | 
If String=NULL or String=leer then use the default "x" Example: <column,default hello>: if there is no content of column then returns "hallo"  | 
|
<string,isnull x>  | 
like default but only if content is "NULL"  | 
|
<string,padr xtoken=xlength>  | 
fills the String up to "xlength" chars from the left with the token "xToken". Example: setvar=ls_value=1 Return: 00001  | 
|
<string,monthname>  | 
If string is date then returns the month  | 
|
<string,datename>  | 
If string is date then returns the week-day  | 
|
<string,rtf>  | 
Converts CR_LF to RTF-CR_LF  | 
|
<string,time>  | 
Formats string to time in current user-language, e. g. 15 gets 15:00 or 3:00 pm  | 
|
<string,time2sec>  | 
Convert time to seconds  | 
|
<string,string2price>  | 
  | 
|
<string,string2currency>  | 
Formatted a price field in a currency field e.g. USD 1,234.56 will be USD  | 
|
<string,tosql>  | 
  | 
|
<string,dbstring>  | 
  | 
|
<string,ascii>  | 
Display the ascii-values from string Example <ABC,ascii> return (65) (66) (67)  | 
|
<string,trimhtml>  | 
Trims trailing and leading empty HTML tags. 
 Example: 
 <p></p>Hello World to Hello World Hello<br>World<span></span> to Hello<br>World 
  | 
<string,json2string>  | 
Convert JSON to String setvar=ls_json=Hello//Wolrd/tTab/'Quote/'  | 
|
<string,tojson>  | 
Convert String to JSON Format. Opposite from json2string Return value with double quote  | 
|
<string,tojsondate>  | 
Convert String to JSON Date format Return value with double quote  | 
|
<string,html2text>  | 
Replace all <, > and ' to { } and ´  | 
|
<string,html2textarea>  | 
Replace all <textarea and </textarea to {textarea and {/textarea  | 
|
<string,html2num x>  | 
This method is to check a numeric value in a string and return it. The default behavior is to use the decimal system on base 10. It is possible to use a system based on 16 or 2 by using the x parameter. It is highly recommended to use this method to prevent SQL injections. 
 Examples setvar=ls_text=0815 
  | 
|
<string,html2html>  | 
  | 
|
<string,dbhtml>  | 
replace ` to ′  | 
|
<string,url2string>  | 
Convert a URL-String to normal String Replace all %-Placeholder  | 
|
<string,tourl>  | 
  | 
|
<string,htmlcharset2string>  | 
  | 
Format  | 
Description  | 
|---|---|
<string,tohex>  | 
Convert an integer (0-255) in hexadecimal with 2 digits 0 = 00, 5=05, 255=FF...  | 
<string,tolonghex>  | 
Convert to long hex with 3 Numbers Example: 255=0000FF, 256 = 000100 and so on (for coloring in HTML)  | 
<string,hex2int>  | 
convert a Hex-Value to Integer, Example FF = 255 setvar=ls_test=Erst%&FCsten 10  |