Methods
The following overview serves as an aid for using the import functions and shows further options for importing data.
Functions¶
The functions listed can be used within an import configuration (XML configuration file) to convert, check or link source data with other information.
Conversion functions¶
Convert a string to another type, the following target data types are available
- Double
- Float
- Int
- Long
Convert any other data type to string
cstring(Object in)
Convert any date format to the CortexEngine format
date(String format, String in)
Additional functions¶
Function | Description |
---|---|
AND(Boolean v1, Boolean v2) |
performs the AND operation on two Boolean values |
concat(String s1, String s2) |
concatenate two input strings to a result string |
DIV(v1, v2) |
returns the quotient of two numeric values |
empty(String in) |
returns whether the transferred string has the length 0 |
endsWith(String str1, String end) |
checks whether the input string (str1) ends with the check string (end) |
equals(String str1, String str2) |
checks whether two strings are equal |
file_extension(String file) |
returns the extension of a transferred file name |
file_woext(String file) |
returns the file name without extension, free of path information |
file(String sFileName) |
imports a file |
filename(String file) |
returns the file name, free of path information |
filepath(String file) |
returns the absolute path of a file |
findFirst(in, match) findFirst(in, match, startPos) |
finds the first position of a character (optionally from a certain position) and returns the position as Int |
findLast(in, match) findLast(in, match, startPos) |
finds the last position of a character (optionally from a certain position) and returns the position as Int |
iif(Boolean ifclause, then, elsedo) |
returns then , if ifclause == true, else elsedo |
length(String str) |
returns the length of a string |
lower(String val) |
converts a string to lower case letters |
MINUS(v1, v2) |
subtracts two numeric values from each other |
MUL(v1, v2) |
returns the product of the two numeric values |
normHnr(String in) |
for normalizing a house number |
NOT(Boolean in) |
returns the transferred Boolean value negated |
notequals(String str1, String str2) |
checks whether two strings are not equal |
OR(Boolean v1, Boolean v2) |
performs the OR operation on two Boolean values |
pad_left(String in, Integer len) |
returns a string in which the characters of the input string are right-aligned by padding the left-hand side with spaces |
pad_right(String in, Integer len) |
returns a string in which the characters of the input string are left-aligned by padding the right-hand side with spaces |
pad_left(String in, String char, Integer len) |
returns a string in which the characters of the input string are right-aligned by padding the left-hand side with the specified character |
pad_right(String in, String char, Integer len) |
returns a string in which the characters of the input string are left-aligned by padding the right-hand side with the specified character |
PLUS(v1, v2) |
adds the two numerical values |
replace(String sIn, String sSeek, String sRepl) |
replaces a search string in the input string with a replacement string |
rsubstring(String in, Integer start) |
returns all characters from the input string, starting from the desired start character start |
split(String src, String splitStr, Integer n) |
returns the nth element from the split input string |
sourceFileName() |
returns the file name incl. extension of the called import file |
substring(String in, Integer start, Integer len) |
returns a substring of the input string with the specified length from the transferred start position |
time(String date) |
converts a string in Cortex date format into a Cortex-internal long timestamp |
trim(String in) |
performs a trim on a string |
upper(String val) |
converts a string to upper case letters |
Variables in the configuration¶
It is particularly helpful for extensive import configurations if values that have already been defined can be reused via variables. Four functions are available for this purpose.
Text values
Variables can be set and read using two functions
getVar(String Name)
setVar(String Name, String Value)
Numeric values (double)
Doubles can be set and read with an extended function
getVarDouble(String Name)
setVarDouble(String Name, String Value)
Variables can only be used to the right of the equals sign of the value assignment. They cannot be used to the left of the equal sign (e.g. to determine a transaction date).