Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
bgColorwhite

CONCATENATE

Use the '+' (plus) operator to concatenate strings or a combination of strings and other type values to produce a single string value.

Syntax

Code Block
string1 + string2 + ... + value1 + ...
  • string1 - The first string that you want to concatenate.
  • string2 - The second string that you want to concatenate.
  • value1 - A value of some type of number, date or boolean that you want to add to the new string value.

Return type

  • string

Examples

ExpressionResultType
12 + " kilometers""12 kilometers"String
"This statement is " + TRUE + ".""This statement is true."String
"I was born on " + Me.birthDateAndTime + ".""I was born on Tue Dec 01 23:00:45 CET 1970."String
( UPPERCASE "hello" ) + ( LOWERCASE " WORLD" )"HELLO world"String
UPPERCASE( "hello" ) + LOWERCASE( " WORLD" )"HELLO WORLD"String

Suppose

Person.FirstName = "Carl"

Person.LastName = 

then Person.FirstName + Person.LastName

? (UNKNOWN)String
UI Text Box
typewarning

Note the correct use of parenthesis in combination with concatenation, see UPPERCASE and LOWERCASE syntax.



UI Text Box
typeinfo

There exists a STR_CONCAT ( string , string ) function in the expression language. As it can only concatenate two strings, and is much longer in typing, we advise to use above way for concatenating strings.

Include Page
_nav_BackToTop
_nav_BackToTop

Panel
bgColorwhite

JOIN

This function joins a series of values into one string, separated with a character of your choice.

Syntax

Code Block
JOIN ( argument1 , argument2 , ... , separator )
  • argument1, argument2 - Attributes or expressions that contain the values that will be joint to a single string. JOIN works for all base types, even multivalued.
  • separator - A string value that will be used as separator symbol.

Return type

  • string
UI Text Box
typenote
an UNKNOWN value will be represented as an empty entry in the result string.
UI Text Box
typenote

The CONCAT function is identical to the JOIN function, except for handling of UNKNOWN.

Examples

Suppose you have a model containing the following attributes.


AttributeBasetypeValue
Person.namestring"John"
Person.date_of_birthdate01-01-1995
Person.family_namestring
ExpressionResultType
JOIN ( Person.name , Person.date_of_birth , ";" )"John;Sun Jan 01 00:00:00 CET 1995"String
JOIN ( Person.name , Person.name , "@" )"John@John"String
JOIN ( Person.name , Person.family_name , YEARS BETWEEN Person.date_of_birth AND DATE ( 2015 , 01 , 01 ) , ";" )"John;;20"String


Include Page
_nav_BackToTop
_nav_BackToTop

...