Siebel Personalization Administration Guide > Functions >

String Functions

Table 33 lists string functions. See also Functions.

Table 33.  String Functions

Left (string, integer)

Returns the left-most n characters in the text string or field.

For example,

Left ("Adams", 2)

returns "Ad".

Mid (string, start [, integer])

Returns n characters from the string starting from the start location.

For example:

Mid ("Adams", 2, 2)

returns "da"

Mid ("Adams", 2)

returns "dams".

Right (string, integer)

Returns the right-most n characters in the text string or field.

For example:

Right ("Adams", 2)

returns "ms".

Len (string)

Returns the length of character string.

For example:

Len ("foo")

returns 3.

InStr (string1, string2 [, start] [, compare])

The position of the first character of string2 in string1.

[,start] is used to specify the position in string1 to begin the search, where the first character in the string is 1. If start is negative, InStr searches backwards.

[,compare] is used to specify if the comparison of strings is case sensitive. Enter 0 for a case-sensitive search, enter 1 for a case-insensitive search.

For example:

InStr ("foo", "oo")

returns 2.

InStr ("bda", "Adams", 2)

returns 2.

InStr ("BDA", "Adams", 2, 1)

returns 2.

If the string is not found, the function returns 0.

InList (string1, comma-separated list)

Returns if string1 occurs one or more times in a comma-separated list.

For example:

InList("foo", "abc,boo,foo")

returns TRUE.

Siebel Personalization Administration Guide