Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The AsText()
returns a rich text as plain text, including all HTML tags as normal and visible text.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a text that includes all HTML tags as normal text.
Returns Invalid expression
if one of the parameter values is unknown, or when the input text is not a rich text.
The Base64ToText()
function decodes a base64 encoded string to a text value. Decoding is carried out using the UTF8 charset.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a base64 decoded text
Returns Invalid expression
if one of the parameter values is unknown.
The Base32ToText()
function decodes a base32 encoded string to a text value. Decoding is carried out using the UTF8 charset.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a base32 decoded text.
Returns [no value]
if one of the parameter values is unknown or not base32 encoded.
Name | Type | Required | Description |
---|---|---|---|
Name | Type | Required | Description |
---|---|---|---|
Name | Type | Required | Description |
---|---|---|---|
text
text
a HTML text
text
text
a base64 encoded text
text
text
a base32 encoded text
The CompareFuzzy()
function compares two texts and returns a number between 0 and 1 (inclusive) that indicates the similarity between the two texts. 0 being totally different (0% match) and 1 being exactly the same (100% match).
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a number that indicates the similarity of text1
and text2
, where a number close to 1 means very similar and a number close to 0 means very different.
Returns Invalid expression
if one of the parameter values is unknown.
The Formatduration()
function converts a duration to text according to the provided format.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a new text string that is the text representation of a duration.
Returns Invalid expression
ifnumber
is unknown or the indicated format is not valid for duration.
The format
parameter can contain a number of WEM specific options:
days - returns the total number of days in the duration
hours- returns the total number of hours in the duration
minutes - returns the total number of minutes in the duration
seconds - returns the total number of seconds in the duration
long - returns the duration as a written string, based on the portal language
stopwatch - returns the duration formatted as follows: (hours):(minutes):(seconds)
clock - returns the duration formatted as follows: (hours):(minutes)
You can also use the [Microsoft format strings](https://msdn.microsoft.com/en-us/library/ee372287(v=vs.110).aspx ) to format the duration.
The FormatNumber()
function converts a number to text according to the specified format.
Returns a new text string that is the formatted text representation of a number.
Returns Invalid expression
if number
is unknown or the indicated format is not valid for numeric values.
If the language
parameter is not specified or contains an unknown value, then the default portal language is used to format the number.
Name | Type | Required | Description |
---|---|---|---|
Name | Type | Required | Description |
---|---|---|---|
See to learn more about GUIDs.
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
text1
text
the first text to compare.
text2
text
the second text to compare.
duration
date time
a duration, in minutes, hours or seconds.
format
numeric
the format is used to specify how the duration should be represented. You can find the different formats below.
language
yes/no
this parameter is used to specify the time representation of that language. If the language parameter contains an unknown value, the default portal language is used to format the duration.
| numeric | a value of any type. |
| numeric | the number of decimals that are included in the returned text |
| yes/no | a boolean that indicates if large numbers are grouped (a separator is used) |
| language keyword | this parameter is used to specify the number representation according to the specified language/culture. |
The JavascriptEncode()
function encodes the given value to a Javascript literal.
Returns a text that contains a JavaScript literal.
Returns null
if the value is unknown.
Value - any WEM value (strings, numbers, boolean, etc.). The following encoding is used for non-native JavaScript types:
Concept - the concept ID is used
Concept set - array of concept ID's is used
Duration - the number of ticks (milliseconds) is used
File - the URL as a string
Reference - string representation of the referenced list and rowID
The Padl()
function keeps prepending a single character to a text until a specified length is reached.
Returns a new text where the indicated character is prepended as many times as necessary until the indicated length is reached.
Returns Invalid expression
if input values do not match required type.
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
| any WEM value | see hint below |
| text | a text string that is used in an HTML element |
| text, numeric | a text or a number. |
| numeric | the number of characters in the resulting text. |
| text | the character to prepend. If this value has more than 1 character, then the first character is taken. |
| text | a text |
The RegExIsMatch()
function checks a text for a pattern if it can be found.
All regex functions use a pattern to check for matches in the input text.
For a more complete explanation and special / allowed characters you can visit this WEM Forum post. Here you find a cheat-sheet and a few helpful examples.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns True if the pattern is found in text.
Returns False if the pattern is not found in text.
Returns [unknown] if no matches are found or the pattern is faulty.
The Padr()
function keeps appending a single character to a text until a specified length is reached.
Returns a new text where the indicated character is appended as many times as necessary until the indicated length is reached.
Returns Invalid expression
if input does not match required type.
Name | Type | Required | Description |
---|---|---|---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
For a more complete explanation and special / allowed characters you can visit . Here you find a cheat-sheet and a few helpful examples.
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
pattern
text
The pattern you want to check for.
text
text
The text you want to check for patterns.
| text, numeric | a text or a number. |
| numeric | the number of characters in the resulting text. |
| text | the character to append. If this value has more than 1 character, then only the first character is taken. |
| text | The pattern you want to check for. |
| text | The text you want to check for patterns. |
The Split()
function splits a text into an array of text values.
On an array (like resulting from this split) you can access a specific item by its position in the array, using the (i)
(1-based) positioning indicator.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Note: The separator
is case sensitive!
Returns an array of text values split at each point where the separator occurs in the given text. Only segments that have a value are included in the returned array. When a split occurs without a value, it is not included. A space is considered as a value and will be returned as a separate array element. This can be useful for counting the number of separations, for example.
The RegExReplace()
function replaces all matches for Pattern in SourceText, and replaces them with the ReplaceText value.
All regex functions use a pattern to check for matches in the input text.
For a more complete explanation and special / allowed characters you can visit this WEM Forum post. Here you find a cheat-sheet and a few helpful examples.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns SourceText with the matching patterns replaced by the replace-text value.
Returns SourceText if no matches are found or the pattern is faulty.
The StringPart()
function splits a text into an array of text values, and returns the part at a specified position.
Returns the part of a text that can be determined by splitting it on the indicated separator and then taking the resulting part at the indicated position.
Returns Invalid expression
if one of the parameters is not valid.
Name | Type | Required | Description |
---|---|---|---|
Name | Type | Required | Description |
---|---|---|---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
text
text
The text to split.
separator
text
Specifies the character(s) to use for separating the text.
pattern
text
The pattern you want to replace.
sourcetext
text
The text you want to check for patterns to replace.
replacetext
text
The text you want to replace the pattern with.
| text | The text to split |
| text | Specifies the character(s) to use for separating the text |
| text | The position of the part to return |
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
| text | a text |
| numeric | (optional) the position to start from |
| numeric | the number of characters to take from |
The ToBase64()
function encodes a text or a file to base64 encoded text.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Encoding is carried out using the UTF8 charset.
Returns a base64 encoded text.
If the parameter is not a valid text or a file, unknown is returned.
Name | Type | Required | Description |
---|---|---|---|
text
text
a text
file
file
a file
The ToULower()
function converts text to lowercase.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a copy of text
converted to lowercase.
Name | Type | Required | Description |
---|---|---|---|
text
text
a text
The ToHex()
function converts a text or number to its hexadecimal equivalent.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a hexadecimal value that is the equivalent of the provided text input or (integer) numeric input. For numeric values, decimals will be ignored - only the integer part of the value will be used for conversion.
Name | Type | Required | Description |
---|---|---|---|
text
text
Original text to be converted to hexadecimal.
number
numeric
Numeric value to be converted to hexadecimal. Only the integer part of a number will be used, any decimals will be ignored.
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
| text | a text |
The ToTitleCase()
function converts every first character of a word to uppercase.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a copy of text
where all words start with an uppercase character.
Name | Type | Required | Description |
---|---|---|---|
text
text
a text
The ToUpper()
function converts text to uppercase.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a copy of text
converted to uppercase.
Name | Type | Required | Description |
---|---|---|---|
text
text
a text
The UrlDecode()
function translates an URL to regular text.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a new text where each special character in text
is decoded.
Returns Invalid expression if the parameter is not a text.
Name | Type | Required | Description |
---|---|---|---|
text
text
a text in URL format.
The UrlEncode()
function makes a text compatible to be used as an URL.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a new text where each special character in text
is URL escaped.
Returns Invalid expression
if the parameter is not a text.
Name | Type | Required | Description |
---|---|---|---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
text
text
a text
| text | a text |
The XmlEncode()
function converts a text to an XML encoded text.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns an XML encoded text.
Returns Invalid expression
if the parameter is not a text.
Name | Type | Required | Description |
---|---|---|---|
text
text
a text that is used in an XML element
The XPathList()
function executes the given XPath query on XML text and returns the result as a text array.
Follow this link to learn more about XPath.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns an text array that is the result of an xpath query.
Returns Invalid expression
if the parameters are not valid according to type.
Name | Type | Required | Description |
---|---|---|---|
xml
text
Text that contains XML
xpath
text
Text that contains an XPath query
The XPath()
function executes the given XPath query on XML text and returns the result as text.
Follow this link to learn more about XPath.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns an text that is the result of an xpath query.
Returns Invalid expression
if the parameter is not a text.
Name | Type | Required | Description |
---|---|---|---|
xml
text
Text that contains XML
xpath
text
Text that contains an XPath query
The XPathNumber()
function executes the given XPath query on XML text and returns the result as a number.
Follow this link to learn more about XPath.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns an number that is the result of an xpath query.
If the result is a list then returns the length of the list.
Name | Type | Required | Description |
---|---|---|---|
xml
text
Text that contains XML
xpath
text
Text that contains an XPath query
This function is only available for backwards compatibility.
The Contains
Keyword is the preferred option: it can be used on Texts, on Concept Sets and on Lists.
Check the page for the Contains keyword.
The Contains()
function checks if a string contains another string.
This check is not case-sensitive and ignores diacritics.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns true
if text contains subtext and false otherwise
The FormatDate()
function converts a date to a specified format.
Typical elements that can be used in the date format: yyyy: full year; MM: month number with leading zero; dd: day-number with leading zero; HH: 24-hour time with leading zero; h: 12-hour time without leading zero; mm: minutes with leading zero; ss: seconds with leading zero; fff: fraction of a second (milliseconds in this case).
See the [Microsoft documentation] (https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx) to learn more about format strings.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a new text string that is the text representation of a date.
Returns Invalid expression
if Date
is unknown or the indicated format is not valid for dates.
When using a format string, the separator and order of your date is dependent on your date settings. You can find and change this setting per portal, see more about portal and language settings here.
If the format
or language
parameter contains an unknown value, then the default portal language is used to format the string.
Name | Type | Required | Description |
---|---|---|---|
Name | Type | Required | Description |
---|---|---|---|
Format name | Example | Description |
---|---|---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
ShortDate
8-4-2022
day month and year in numbers.
ShortDateTime
8-4-2022 17:51
day, month, year and time in numbers
LongDate
vrijdag 8 april 2022
day of the week and month in text with the day and year in numbers.
LongDateTime
vrijdag 8 april 2022 17:51
day of the week and month in text with the day, year and time in numbers.
Iso8601
2022-04-08T17:51:38
date in the iso8601 standard
text
text
Original text you want to check.
subtext
text
Text that you check the original text for.
date
date time
a date
format
text or formatstring
the format is used to specify how the date should be represented, text or a format string can be used.
language
text
this parameter is used to specify the date representation of that language
| text | Original text in hexadecimal form. |
| text | a text to be used as an attribute in HTML tags |
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
| text or list | a list of text |
| text | is placed between the parts when they are joined together. |
| text | is placed between the last two parts. |
The IndexOf() function returns the position of a text within another text.
It will return 0 if the searched text was not found.
This function is NOT case-sensitive.
Returns the position as a numeric value where the searched text is found within the source.
The index of the first character is 1, the second character is 2, etc. (1-based).
Returns 0 if the searched text is not found within the source.
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
| text | the source in which the function will search for the search text |
| text | the text to search for |
The ToBase32()
function encodes text to base32 encoded text.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Encoding is carried out using the UTF8 charset.
Returns a base32 encoded text.
If the parameter is not a valid text, unknown is returned.
Name | Type | Required | Description |
---|---|---|---|
This function is NOT SQL compatible. For more information about SQL compatibility, see our .
Name | Type | Required | Description |
---|
text
text
a text
| text, numeric, yes/no, list | values of these types can be used. |
The ToBase64Url()
function encodes a text or a file to a base64 encoded text which is safe to use in URLs.
WIKI: https://en.wikipedia.org/wiki/Base64#The_URL_applications
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Encoding is carried out using the UTF8 charset.
Returns a base64 encoded text that is safe to use in URLs.
Name | Type | Required | Description |
---|---|---|---|
text
text
a text
file
file
a file
The Replace()
function returns a new text in which all occurences of old_value
in text
are replaced by new_value
.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a new text where each occurence of old_value
is replaced by new_value
.
Returns Invalid expression
if the result is not a text.
Name | Type | Required | Description |
---|---|---|---|
text
text
the text on which the replace operation is performed.
old_value
text
the text that is to be replaced by new_value
.
new_value
text
the text that replaces all occurrences of old_value
.
The XmlAttributeEncode()
function encodes the given text
such that is can safely be used inside an XML attribute.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a text that can safely be used inside an XML attributel.
Returns Invalid expression
if the parameter is not a text.
Name | Type | Required | Description |
---|---|---|---|
text
text
a text that is used as an XML attribute
The ToString()
function converts a value to text.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Note: this function uses the language setting of a portal when converting a value.
Returns a text representation of value
.
Name | Type | Required | Description |
---|---|---|---|
value
a value of any type.
format
text
a text with the format to which value
must be converted. This parameter only applies when converting a datetime
, duration
or number
.