All pages
Powered by GitBook
Couldn't generate the PDF for 162 pages, generation stopped at 100.
Extend with 50 more pages.
1 of 100

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...

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...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Aggregation

Functions

IsPreview

The IsPreview()function checks if the portal is being used in the Preview Runtime environment.

This function allows you to make certain features available only in the Preview environment. For example in a "Visible when" property of a navigation item, or even using a Decision Node in a flowchart to make a detour.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns yes/true if the portal is being used in the Preview environment.

Returns no/false otherwise (staging or live).

Syntax

IsPreview()

IsPreview() => Yes, if portal is being used in the Preview environment, No otherwise (staging or live)

Concepts

Math

Lists

ConceptId

The ConceptId() function returns the internal id of a concept.

Read general information about Concepts and Ontology

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a number that is internally used by wem to identify concept.

Returns Unknown if the parameter is unknown.

Syntax

ConceptId(concept)

ConceptId('tickets') =>Result: 382446

ConceptId(unknownconcept) =>Result: unknown

ConceptId(

Parameters

Name
Type
Required
Description

First

The First() function returns the first item in a list or concept set.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the first item in the given list or concept_set.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

First() and Last() on a database list use the RowID for standard sorting - so First([Name] of [Products]) will get the name-fieldvalue of the first item created, and Last([Name] of [Products]) will get the name-fieldvalue of the last item created.

You can limit/specify the resultlist using the WHERE options, and within that resultlist, the lowest or highest RowID will be returned.

In future we will add the [Order By] syntax to WEM Expressions, so you can specify the order yourself in the expression, and then the First and Last will use that sorting.

In some specific cases if you want the First/Last item based on another fieldvalue, like LastModified, you could use something like

Syntax

First(list)

First(List("A", "B", "C")) =>Result: "A"

First([Products] where [Product.Price] > 10) =>Result: returns the first row of products that cost more than 10 euro

First([Products] WHERE [LastModified] = Max([LastModified] of [Products]))

First(concept_set)

First({ Color.Orange, Color.Blue, Color.Red }) =>Result: Color.Orange

First() =>Result: unknown

Parameters

Name
Type
Required
Description

DayOfWeek

The DayOfWeek() function returns the day of the week. Monday is day 1 and Sunday is day 7.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a number that represents the day of a week where 1 is Monday, 2 is Tuesday, etc.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Syntax

DayOfWeek(date)

DayOfWeek('1966-08-07') =>Result: 7

DayOfWeek(UnknownDateTime) =>Result: (unknownNumber)

Parameters

Name
Type
Required
Description

Average

The Average() function calculates the average of a list of numbers, date times or duration.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns number, datetime or duration that is the average of the given values.

Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.

Syntax

Average(List(values) or [field] of [list])

Average(List(1, 3, 6, 2)) => Result: 3

Average([Products.Price] of [Products])

Parameters

Name
Type
Required
Description

Union

The Union() function produces a concept set with all the concepts from a collection of concept sets and concepts (needs the List() function to combine literal sets and concepts).

Combining concepts and concept sets into a new concept set can also be achieved using addition (+).

This function is NOT SQL compatible. For more information about SQL compatibility, see our

DatePart

The DatePart() function retrieves a part from a date. For example, the year, the month, the week, the day, the hour, the minutes or the seconds.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

UTCToday

The UTCToday() returns the current date in UTC

WIKI:

This function is SQL compatible. For more information about SQL compatibility, see our .

PortalId

The PortalId()function gets the id of the current portal.

This function can be used to enable or disable certain features for a specific portal.

This function is SQL compatible. For more information about SQL compatibility, see our .

ProjectName

The ProjectName() function gets the name of the current project.

This function is SQL compatible. For more information about SQL compatibility, see our .

first(concept of [1482498: Colors] where concept:'SecondaryColor' = true) )
=>
Result:
113787

concept

concept

☑️

a single concept, either literal or as expression

First([list] WHERE [LastModified] = Max([LastModified] of [List]))

=>
Result: returns the last modified item in products (first row of products that has been modified last)

First() =>Result: unknown

list

List of elements of the same type

☑️

a list of values or elements of the same type.

concept_set

A list of concepts

☑️

a list of concepts

date

date time

☑️

a date

=>
Result: average Price-value of all products in the list
[Products]

values

list of numbers datetimes or durations.

☑️

The list of values for which the average is calculated. The values can be either numbers, datetimes or durations.

.

Returns a new concept set with all concepts provided in the parameter list. This collection can contain concepts from different parents.

Returns Unknown if one of the parameter values is unknown.

Syntax

Union( List(concepts | concept_sets) )

Union( List('Colors'.'Orange', 'Colors'.'Red', 'Colors'.'Blue') ) =>Result: { orange, red, blue } as a new concept set

Union( [Products.Markets] of [Products] ) =>Result: a combination of only the Markets that are stored in multi-select field in Products, for example { 'APAC', 'EMEA', 'CIS', 'LATAM', 'NA' }. Using the [multi-select-field] of [list] results in a list of concept-sets, so the List() function is not necessary in this case.

Union( List(GetChildren('Color'), [AllDevices], 'Status'.'Assigned') ) =>Result: a combination of all color-children concepts, all Devices from conceptset and the Assigned status concept.

Similar results can be achieved with addition:

'Colors'.'Orange' + 'Colors'.'Red' + 'Colors'.'Blue'

List(GetChildren('Color') + [AllDevices] + 'Status'.'Assigned'

Parameters

Name
Type
Required
Description

List(concepts | concept_sets)

A list of concepts and/or concept-sets

☑️

a list of separate concepts or concept-sets

Read general information about Concepts and Ontology
documentation
Returns a number that is a part of a date. If the date is unknown then this function returns unknown.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Syntax

DatePart(date, unit)

DatePart('2016-05-02T05:37:44', year) =>Result: 2016

DatePart() =>Result: unknown

Parameters

Name
Type
Required
Description

date

date time

☑️

a date

unit

keyword

☑️

Date unit keyword

Possible values: year, month, week, day, hour, minute or second.

documentation

Returns the current date in UTC.

Syntax

UTCToday()

UTCToday() =>Result: 4/6/2022

https://en.wikipedia.org/wiki/Coordinated_Universal_Time
documentation

Returns the Id as number of the current portal id.

Syntax

PortalId()

PortalId() => 34372

PortalId() = 34372 => Yes

documentation
Returns a text with the current project name.

Syntax

ProjectName()

ProjectName() => "WEMDocumentationProject"

documentation

IpAddress

The IpAddress()function gets the IP address of the client.

This function can be used to route users from a certain network to a specific page or a custom login process. It can also be used to track the (public) IP-addresses of your users. Please note that some countries have legislation about using and storing IP-addresses (GDPR).

WIKI: http://en.wikipedia.org/wiki/IP_address

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a text that contains the IP-address of the client viewing the WEM website.

Syntax

IpAddress()

IpAddress() => "90.145.239.131"

NodeTrail

The NodeTrail() function returns the most recent flowchart nodes (to a max of 20 nodes) that the user passed in current flow.

This function can be used in debugging, allowing you to see the history of steps taken before a certain situation is reached. Every number divided by the "," can be used to search for in the flowchart tab, to find the corresponding node.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a text that lists up to the last 20 flowchart nodes that the user passed.

Syntax

NodeTrail()

NodeTrail() => "1365,3394,5559,9805"

Environment

UTCNow

The UTCNow() returns the current date and time in UTC.

WIKI: https://en.wikipedia.org/wiki/Coordinated_Universal_Time

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the current date and time in UTC.

Syntax

UTCNow()

UTCNow() =>Result: 4/6/2022

UrlPath

The URLPath() function returns the URL path of the current page.

The URLPath can be configured in a Navigation Item when it is a deeplink. Combined with the hostname of the portal, the UrlPath provides a link that can be used as an address or link from outside (in e-mail for example) directly to the flowchart that is linked to the Navigation Item.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a text with the URL path of the current page.

Syntax

UrlPath()

UrlPath() => "/functions/environment-functions"

PortalName

The PortalName()function gets the name of the current portal.

This function can be used to enable or disable certain features for a specific portal.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the Name of the current Portal.

Syntax

PortalName()

PortalName() => Default

IsStaging

The IsStaging()function checks if the portal is being used in the Staging Runtime environment.

This function allows you to make certain features available only in the Staging environment. For example in a "Visible when" property of a navigation item, or even using a Decision Node in a flowchart to make a detour.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns yes/true if the portal is being used in the Staging Runtime environment.

Returns no/false otherwise (preview or live).

Syntax

IsStaging()

IsPreview() => Yes, if portal is being used in the Staging environment, No otherwise (preview or live)

Security

Files

ProjectVersion

The ProjectVersion() function gets the latest publish timestamp the current project.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Available on Runtimes version 4.2 and up.

Returns a date and time indicating the last modified timestamp of the project at the time the project was published.

Syntax

ProjectVersion()

ProjectVersion() => "2024-12-13 09:05:15"

IsLive

The IsLive()function checks if the portal is being used in the Live Runtime environment.

This function allows you to make certain features available only in the Live environment. For example in a "Visible when" property of a navigation item, or even using a Decision Node in a flowchart to make a detour.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns yes/true if the portal is being used in the Live environment.

Returns no/false otherwise (preview or staging).

Syntax

IsLive()

IsLive() => Yes, if portal is being used in the Live environment, No otherwise (preview or staging)

AesIv

Pi

Returns the value of Pi with 10 decimals.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Syntax

PI

PI => 3.1415926536

Date

LocalName

The LocalName() function returns the local name of a given concept.

Read general information about Concepts and Ontology

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a text that contains the local name of a concept.

An unknown value is returned if the concept is unknown.

Syntax

LocalName(concept)

LocalName('Misc'.'Data type'.'EntityReference') =>Result: "EntityReference"

LocalName('World regions'.'EMEA'.'CIS') =>Result: "CIS"

LocalName( GetParent('World regions'.'EMEA'.'CIS') )

Parameters

Name
Type
Required
Description

GetChildren

The GetChildren() function returns all the child concepts of a concept.

Read general information about Concepts and Ontology

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a concept set that contains the direct child concepts of a concept.

An unknown value is returned if the concept has no children or the given parameter is unknown.

The function includes all descendants (multiple levels).

Syntax

GetChildren(concept)

GetChildren('World regions'.'EMEA') =>Result: { MENA, CIS, DACH }

GetChildren('Color') =>Result: { Blue, Red, Yellow, Green, Orange, Purple, Amber, Magenta, Teal, Violet }

GetChildren('Color') where concept:'PrimaryColor' = true =>Result: { Blue, Red, Yellow }

Parameters

Name
Type
Required
Description

Today

The Today() function returns the current date.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the current date without the time.

The function includes the current time.

Syntax

Today()

Today() =>Result: 4/12/2022

Count

The Count() function returns the number of items in a list or concept set.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the number of items in the given list or concept_set.

Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.

Syntax

Count(list)

Count(List("A", "B", "C")) =>Result: 3

Count([Products] where [Product.Price] > 10) =>Result: returns the number of products that cost more than 10 euro

Count() =>

Count(concept_set)

Count({ Color.Orange, Color.Blue, Color.Red }) =>Result: 3

Count(unknownconceptset) =>Result: unknown

Parameters

Name
Type
Required
Description

Synonyms

The Synonyms() function returns the synonym text values of a concept.

Read general information about Concepts and Ontology

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns an array with text values that contain the synonyms of the given concept.

An unknown value is returned if the concept is unknown or there are no synonyms provided in the concept properties.

Syntax

Synonyms(concept)

Synonyms('Misc'.'GroupingLocalName') =>Result: "Groups, Group, Collection"

Split(ToString( Synonyms('Misc'.'GroupingLocalName') ), ", ")(2) =>Result: Group

Synonyms('concept-with-no-synonyms')

Parameters

Name
Type
Required
Description

Intersection

The Intersection() function produces a concept set that contains the concepts that a part of all given concept sets in the parameters.

Read general information about Concepts and Ontology

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a concept set with the concepts that occur in each concept set provided in the parameter list.

An unknownconceptset value is returned if any of the conceptsets in the list is unknown, or if there is no concept available in all sets in the parameterlist.

Syntax

Intersection( List(concept_set_1, concept_set_2, ...) )

Intersection( List([AllColors], 'Color'.'Purple') ) =>Result: { Purple } (as a conceptset with one concept)

Intersection( List( [AllColors], {'Color'.'Amber', 'Color'.'Teal'}) ) =>Result: { Amber, Teal }

Intersection( List( [AllColors], [EMEA-Regions]) )

Parameters

Name
Type
Required
Description

DateOnly

The DateOnly() function only returns the date part without the time part of a date.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the date only.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Syntax

DateOnly(datetime)

DateOnly('2016-05-02T05:37:44') =>Result: 5/2/2016

DateOnly(unknowndatetime) =>Result: unknowndatetime

Parameters

Name
Type
Required
Description

ApplicationId

The ApplicationId()function returns the Id of the application

Only available for projects running on 4.2 runtime. Details will follow.

Syntax

ApplicationId()

=> "...."

Parameters

Name
Type
Required
Description

FromUnixTimestamp

The FromUnixTimestamp() function converts a unix timestamp to a date.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the date represented by the given unix timestamp

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

This function returns the date in the format settings of your project.

Syntax

FromUnixTimestamp(timestamp)

FromUnixTimestamp(1648637600) =>Result: Wednesday, March 30, 2022 10:53:20 AM

FromUnixTimestamp(unknowntimestamp) =>Result: unknown

Parameters

Name
Type
Required
Description

Now

The Now() function returns the current date.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the current date with the current time

The function excludes the current time.

Syntax

Now()

Now() =>Result: 4/12/2022

Setting

The Setting()function returns the text value of a project variable. Project variables are configured in the Project Configuration page.

This function in combination with the project variables allows you to have a single place to edit variables that are used in multiple parts of your application. In the example below a project variable named "Support e-mail" is added.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the text value of a project variable.

Syntax

Setting("name")

Setting("Support e-mail") => [email protected]

Parameters

Name
Type
Required
Description

ToUnixTimestamp

The ToUnixTimestamp() function converts a date to a unix timestamp.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the date as a unix timestamp.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Syntax

ToUnixTimestamp(date)

ToUnixTimestamp(Now()) =>Result: 1648645519

ToUnixTimestamp(Date(2022, 05, 30)) =>Result: 1648637600

ToUnixTimestamp(unknowntimestamp)

Parameters

Name
Type
Required
Description

DateDiff

The DateDiff() function calculates the difference between two dates. You can use the DateDiff for the difference in: year, month, week, day, hour, minute or second.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

MoveDate

The MoveDate()function shifts a date by a given amount of a date unit.

This function is SQL compatible. For more information about SQL compatibility, see our .

Max

The Max() function calculates the highest value of a list of numbers, datetimes or durations.

This function is SQL compatible. For more information about SQL compatibility, see our .

TimeOfDay

The TimeOfDay() function returns the duration that represents the fraction of the day that has elapsed since midnight.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

ToLocal

The ToLocal() function converts a UTC date to a local date with the given timezone (TZ database name). You can find the time zones used in wem in the list of .

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

MimeType

The MimeType() function returns the type of a provided file, based on its extension and the first few bytes in the file.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

IsHttps

Checks whether the portal is viewed in (secure communication).

In you can activate [force https] to make your portal run in secure https-mode.

This function is SQL compatible. For more information about SQL compatibility, see our .

IsFirstRequest

The IsFirstRequest()function checks if the server is handling the first request of the client.

The first request of a client is the first time a browser tab connects to any page in your application. All subsequent actions in that same browser tab will no longer be viewed as the first request as long as the session is active.

This function can be used for an action that you would only like to perform when a user opens your application for the first time.

This function is SQL compatible. For more information about SQL compatibility, see our

FileSize

The FileSize() function returns the size of a file, in KB’s.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

Log10

The Log10() function calculates the base-10 logarithm of a given number.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

Ceiling

The Ceiling() function rounds a number up to an integral value (integer number without decimals) larger than or equal to the given number.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

CountryName

The CountryName() function returns the name of the country that belongs to the specified language parameter.

The language parameter is a specific language-code which is in the form en_US or nl_NL. (not a text with double quotes). The Expression Editor Functions Pane has a folder Localization where you can find the specific LanguageCodes.

Exp

The Exp() function calculates the e-number raised to the power n, where n is an number.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

ToUTC

The ToUTC() function converts a local date with the given timezone (TZ database name) to a UTC date. You can find the time zones used in wem in the list of .

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

GetParent

The GetParent() function returns the direct parent concept of a given concept.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

NameOf

The NameOf() function returns the name of an item from the data model.

This function is SQL compatible. For more information about SQL compatibility, see our .

Min

The Min() function calculates the lowest value of a list of numbers, datetimes or durations.

This function is SQL compatible. For more information about SQL compatibility, see our .

FileName

The FileName() function returns the name of a file.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

AesKey

Generates a unique 256 bit AES key, to be used with the AES encryption and decryption functions.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

=>Result: "EMEA"

LocalName(unknownconcept) =>Result: unknowntext

concept

concept

☑️

a single concept, either literal or as expression

Result: unknown

list

List of elements of the same type

☑️

a list of values or elements of the same type.

concept_set

A list of concepts

☑️

a list of concepts

=>
Result: unknown

Synonyms(unknownconcept) =>Result: unknown

concept

concept

☑️

a single concept, either literal or as expression

=>
Result: unknownconceptset

Intersection( List(unknownconceptset, [AllColors]) ) =>Result: unknownconceptset

concept_set_x

list of concepts

☑️

2 or more sets of concepts (or a single concept) combined with the List() function as parameterlist.

datetime

date time

☑️

a date

language

languagecode

☑️

Specific language code (available within the Localization folder in the Expression Editor.

timestamp

numeric

☑️

A unix timestamp (seconds passed since JAN 01 1970)

name

text

☑️

a text with the name of a project setting

=>
Result: unknown

date

date time

☑️

a date value

GetChildren('Color'.'Green') =>Result: unknown

GetChildren(unknownconcept) =>Result: unknown

concept

concept

☑️

a single concept, either literal or as expression

GetDescendants()
Now()
Today()
Returns a number, datetime or duration that is the highest value of the given values.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Syntax

Max(List(values) or [field] of [list])

Max(List(1, 2, 5, 3)) => Result: 5

Max(List(45s, 12s, 50s, 1m25s) => Result: 1m25s

Max([Products.Price] of [Products]) => Result: the max Price-value of all products in the list [Products]

Max() => Result: unknown

Parameters

Name
Type
Required
Description

values

list

☑️

the list of values. The values can be either numbers, datetimes or durations.

documentation
Returns the duration that represents the fraction of the day that has elapsed since midnight.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Syntax

TimeOfDay(datetime)

TimeOfDay('2017-03-31T13:27:00') =>Result: '13h27m'

TimeOfDay() =>Result: unknown

Parameters

Name
Type
Required
Description

datetime

date time

☑️

a specified date and time

documentation
Returns the local date with the given timezone.

Returns null if the timezone argument is not recognized.

Syntax

ToLocal(utcdate, timezone)

ToLocal(date(2020,8,16,15,37), "Europe/Amsterdam") =>Result: 8/16/2020 17:37​

ToLocal(date(2020,8,16,15,37), "Australia/Melbourne") =>Result: 8/17/2020 01:37

ToLocal(date(2020,8,16,15,37), "unrecognised TZ") =>Result: unknown

Parameters

Name
Type
Required
Description

utcdate

date time

☑️

a UTC date value

timezone

text

☑️

full timezone name

IANA Standard Time zones
documentation
Returns a text that contains the mime type of a file.

Returns Unknown if the parameter value (file) is unknown.

Common media types are listed on wikipedia.

Syntax

MimeType(file)

MimeType([PngImageFile]) 👍Result: "image/png"

MimeType([JPG-ImageFile]) 👍Result: "image/jpeg"

MimeType([CSV-File]) 👍Result: "text/csv"

MimeType([PDF-File]) 👍Result: "application/pdf"

MimeType(unknownfile) 👎Result: unknown

Parameters

Name
Type
Required
Description

file

file

☑️

a file

documentation
Returns yes/true if the portal is running in secure https mode.

Returns no/false if portal is running in unsecure http mode.

Syntax

IsHttps()

IsHttps() => Yes, if portal is running in secure https mode

IsHttps() => No, is portal is running in unsecure http mode

HTTPS
Portal - Hostname Settings
documentation
Returns a number, which is the size of the given file, in KB’s.

Returns Unknown if the parameter value (file) is unknown.

Syntax

FileSize(file)

FileSize([PngImageFile]) 👍Result: 60.0 (in KB - kilobytes)

FileSize(unknownfile) 👎Result: unknown

Parameters

Name
Type
Required
Description

file

file

☑️

the file of which the size has to be calculated

documentation
Returns the base-10 logarithm of number. Returns Invalid expression if the parameter value is not a valid number.

This function uses 32-bit Integers, therefore the range of valid parameters is

-2147483648 and +2147483648

Syntax

Log10(number)

Log10(100000) => 5

Log10() => Invalid expression

Parameters

Name
Type
Required
Description

number

numeric

☑️

a numeric value.

Examples

Function call
Result

Log10(0)

(no value)

Log10(100000)

5

Log10(0.00005)

-4.3010299957

Log10(-20)

(no value)

documentation
Returns the closest integral value that is larger than or equal to number. Returns Invalid expression if the parameter is not a valid number.

This function uses 32-bit Integers, therefore the range of valid parameters is

-2147483648 and +2147483648

Syntax

Ceiling(number)

Ceiling(123.4567) => 124

Ceiling(unknownnumber) => Invalid expression

Parameters

Name
Type
Required
Description

number

numeric

☑️

a number

Examples

Function call
Result

Ceiling(5)

5

Ceiling(5.0001)

6

Ceiling(123.123)

124

Ceiling(-123.89)

-123

documentation
Returns a number. Returns Invalid expression if the parameter is not a valid number.

This function uses 32-bit Integers, therefore the range of valid parameters is

-2147483648 and +2147483648

Syntax

Exp(number)

Exp(10) => 22026.4657948067

Exp() => Invalid expression

Parameters

Name
Type
Required
Description

number

numeric

☑️

a numeric value.

Examples

Function call
Result

Exp(0)

1

Exp(-0.6)

0.548812

Exp(-1000)

0

Exp(10)

22026.4658

documentation
Returns a UTC date.

Returns null if the time zone argument is not recognized

Syntax

ToUTC(date, timezone)

ToUTC(date(2020,8,16,15,37), "Europe/Amsterdam") =>Result: 16 August 2020 13:37

ToUTC(date(2020,8,16,15,37), "Australia/Melbourne") =>Result: 16 August 2020 05:37

ToUTC(unknowntdate, unknowntimezone) =>Result: unknowndate

Parameters

Name
Type
Required
Description

date

date time

☑️

a date value

timezone

text

☑️

Full timezone name. You can find the different names in the portal settings.

IANA Standard Time zones
documentation

Returns the direct parent concept of a given concept.

An unknown value is returned if the concept has no parent or the given parameter is unknown.

The GetAncestors() function includes the entire parent chain from root to concept (excluding root and concept).

Syntax

GetParent(concept)

GetParent('Color'.'Violet') =>Result: Color

GetParent('World regions'.'EMEA'.'MENA') =>Result: EMEA

GetParent(unknownconcept) =>Result: unknown

Parameters

Name
Type
Required
Description

concept

concept

☑️

a single concept, either literal or as expression

Read general information about Concepts and Ontology
documentation
Returns the name of an item from the data model (the value as entered in the Name-property of the data-model item).

Syntax

NameOf(data-item)

NameOf( [Locations.Long] ) => "Long"

NameOf( [Products] ) => "Products"

NameOf([ListFilter-SearchAvailable]) => "Search on Available"

NameOf("") => invalid parameter

Parameters

Name
Type
Required
Description

data-item

field

☑️

a field from your data model

documentation
Returns a number, datetime or duration that is the lowest value of the given values.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Syntax

Min(List(values) or [field] of [list])

Min(List(1, 2, 5, 3)) =>Result: 1

Min(List(45s, 12s, 50s, 1m25s) =>Result: 12s

Min([Products.Price] of [Products]) => Result: the min Price-value of all products in the list [Products]

Min() =>Result: unknown

Parameters

Name
Type
Required
Description

values

list

☑️

list of values which can be either numbers, datetimes or durations.

documentation
Returns the name of the file.

Returns Unknown if the parameter value (file) is unknown.

Syntax

FileName(file)

FileName('Data'.'ConceptWithFile':'File') 👍Result: image29.jpg

FileName(unknownfile) 👎Result: unknown

Parameters

Name
Type
Required
Description

file

file

☑️

the file

documentation
Syntax
AesKey()

AesKey() => 98cb66a97c968b631cf8135a6add789b848fb1f16cb1cf522d8f3a2c6f3fb759

documentation

Hostname

The Hostname() function returns the domain name of the active portal of your published WEM project. For more information about the domain name visit https://en.wikipedia.org/wiki/Domain_name.

This function can be used to create links to (specific pages of) your application. For example a link in a reset password or create account e-mail (see syntax for an example). By using the hostname function you ensure that the generated link always points to the right portal in the right environment.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a text that contains the hostname of the portal in its particular runtime environment when used.

Syntax

Hostname()

Hostname() => portalname.staging.wem.io (on staging runtime) => portalname.live.wem.io (on live runtime)

"https://" + Hostname() + "/create-account" => https://portalname.staging.wem.io/create-account (on staging runtime) => https://portalname.live.wem.io/create-account (on live runtime)

.

Returns yes/true if the server is handling the first request of the client.

Returns no/false otherwise.

Syntax

IsFirstRequest()

IsFirstRequest() => Yes, if user accesses the portal for the first time this session.

IsFirstRequest() => No, on subsequent requests and actions within the portal.

documentation
Returns a number that is the difference between two dates in a specific unit. If one of the two dates is unknown then this function returns unknown.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Syntax

DateDiff(start_date, end_date, unit)

DateDiff('2014-08-21', '2002-12-31', Year) =>Result: 11

DateDiff() =>Result: unknown

Parameters

Name
Type
Required
Description

start_date

date time

☑️

the start date

end_date

date time

☑️

the end date

unit

documentation
Returns a new date where a number of units is added/subtracted to/from a date.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Although MoveDate() IS SQL Compatible - meaning it will be used on the database to return a smaller resultset, it may be slow in execution on the database, depending on the situation (number of records, distribution over data-pages, the filter in total with maybe other fields) where SQL may not be able to optimize the execution plan...

Syntax

MoveDate(date, number, unit)

MoveDate('2016-05-02T05:37:44', -3, year) =>Result: Thursday, May 2, 2013 5:37:44 AM

MoveDate(UnknownDate, UnknownNumber, Unknownunit) =>Result: (unknowndate)

Parameters

Name
Type
Required
Description

date

date time

☑️

a date

number

numeric

☑️​​

the number or amount that a date the value is moved.

unit

documentation
This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a text that contains the name of the country that belongs to the specified language.

Returns Unknown if the parameter is unknown. Shows a syntax error "parameter mismatch" in the expression editor if the parameter is not a valid LanguageCode.

Syntax

CountryName(language)

CountryName(en_US) =>: "United States"

CountryName(ja_JP) => "Japan"

CountryName(CurrentLanguage) => "Netherlands" (if current language is set to Dutch)

CountryName( (3) ) => { the country name of the third language in the list of available languages

Parameters

Name
Type
Required
Description

language

languagecode

☑️

Specific language code (available within the Localization folder in the Expression Editor.

Last

The Last() function returns the last item in a list or concept set.

For (persistent) lists it now also accepts a list as parameter - only to be used in Kubernetes Runtime 4.2 (not in Shared Europe, Shared APAC or any private runtime 4.1.xxx).

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the last item in the given list or concept_set.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Possible fault message in expression editor: Invalid call to a function: parameter mismatch at position(x,y): Last

This could mean that there is no field of list used, but only the (reference to a) list.

For Runtimes Shared EUR, Shared APAC and Private Clouds v4.1.xx, the Last function needs a field from list where filter construction, or if you only want to get the last row of a list, use RowId([list]) of [list] where [filter].

For Runtimes 4.2, the Last function now also accepts a List as parameter - no longer requiring a specific field.

First() and Last() on a database list use the RowID for standard sorting - so: First([Name] of [Products]) will get the name-fieldvalue of the first item created, and Last([Name] of [Products]) will get the name-fieldvalue of the last item created.

You can limit/specify the resultlist using the WHERE options, and within that resultlist, the lowest or highest RowID will be returned.

In future we will add the [Order By] syntax to WEM Expressions, so you can specify the order yourself in the expression, and then the First and Last will use that sorting.

In some specific cases if you want the First/Last item based on another fieldvalue, like LastModified, you could use something like

Syntax

Last(List(values) or [field] of [list] or [List])

Last(List("A", "B", "C")) =>Result: "C"

Last(RowId([list]) of [list] where HasValue([field in list])) =>Result: last row in the indicated list where a certain field has a value

Last([DateModified] of [list] where HasValue([field in list]))

Parameters

Name
Type
Required
Description

CountryCode

The CountryCode()function returns two-letter country code of a language parameter.

The language parameter is a specific language-code which is in the form en_US or nl_NL. (not a text with double quotes). The Expression Editor Functions Pane has a folder Localization where you can find the specific LanguageCodes.

This function is SQL compatible. For more information about SQL compatibility, see our .

Returns a text that contains the two-letter country code of a language.

Returns Unknown if the parameter value is unknown. Shows a syntax error "parameter mismatch" in the expression editor if the parameter is not a valid LanguageCode.

Syntax

CountryCode(language)

CountryCode( en_US ) => "US"

CountryCode( ) => "NL" (when the currentlanguage is set to Dutch)

Parameters

Name
Type
Required
Description

GetDescendants

The GetDescendants() function returns all descendant concepts of a concept.

Read general information about Concepts and Ontology

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a concept set that contains all the descendant concepts of a concept. The concept parameter is not included.

An unknown value is returned if the concept has no descendants or the given parameter is unknown.

The function only returns the direct child concepts.

Syntax

GetDescendants(concept)

GetDescendants('World regions') =>Result: APAC, EMEA, MENA, CIS, DACH, LATAM, NA

GetDescendants('Color'.'Green') =>Result: unknown

GetDescendants(unknownconcept)

Parameters

Name
Type
Required
Description

Cos

The Cos() calculates the cosine of a given radian value.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns cosine of number Returns invalid expression if the parameter has no value or is not a valid number.

This function uses 32-bit Integers, therefore the range of valid parameters is

-2147483648 and +2147483648

Syntax

Cos(rad)

Cos(1) => 0.5403023059

Cos() => Invalid expression

Parameters

Name
Type
Required
Description

Examples

Function call
Result

Description

The Description() function returns the description of a concept.

Read general information about Concepts and Ontology

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the description of a concept. This description can be edited in the properties of the concept.

Returns Unknown if the parameter is unknown, or if the description property is empty.

Syntax

Description(concept)

Description('Images'.'Piano') =>Result: "Which instruments do you want us to break?"

Description(unknownconcept) =>Result: unknown

Parameters

Name
Type
Required
Description

IsNewRow

The IsNewRow() function returns a boolean value that indicates if the specified row is newly created and not yet saved to the database.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns true if the specified row is not yet saved to the database. Returns false if the specified row is already saved to the database.

  • If the parameter is a list, then the current row of the list is taken.

  • If the parameter is a reference, then the referenced row is taken.

Syntax

IsNewRow(list)

IsNewRow( [Users] ) => yes - when a new row has been created and not yet saved

IsNewRow( [Products] ) => no - when there is no new row created in current session.

IsNewRow(reference)

IsNewRow( [CurrentUser-Reference] ) => yes - when the current user reference field is pointing to a row which has just been created and not yet saved

IsNewRow( [CurrentProduct-Reference] ) => no - when the current product reference field is pointing to a row which has been saved or retrieved from the database (previously saved).

Parameters

Name
Type
Required
Description

Sqrt

The Sqrt() function calculates the square root of a number.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a number that is the square root of a givennumber. Returns Invalid expression if the parameter is not a valid number.

This function uses 32-bit Integers, therefore the range of valid parameters is

-2147483648 and +2147483648

Syntax

Sqrt(number)

Sqrt(100) => 10

Sqrt() => Invalid expression

Parameters

Name
Type
Required
Description

Examples

Function call
Result

IsOnRow

The IsOnRow() function returns a yes/no value that indicates that the indicated list has a specific Row selected; this can be achieved for example by using a list node (go to row), loop node (going though multiple rows in a list) or clicking on a row in a datagrid. or - in case a reference-field is used with this function - the reference-field has a value and is indeed pointing to a specific row in the referenced list (achieved using an assignment node).

When a List is on a specific row, you can access the values of the fields in the list (to read or write values). If you try to read or write specific fields in a list, when there is no current row, you will get a fault message with something like "there is no current row". So, to be sure you can access fields of a specific item in a list and to avoid this fault situation, you can check this using the IsOnRow function.

The list-node action Reset Row Position will set the IsOnRow to false: there will be no specific row selected on the list. The assignment action Clear value on a reference-field will clear the reference so it will no longer point to a specific row - the IsOnRow will in that case also yield false.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

Returns True if the list has a specific row selected and the list-fields can be used to read/write values. Or - in case a reference-field is used - the reference field points to a specific row item in the list.

Returns False if the list has no current active row which can be used, or - in case a reference-field is used - the reference field is not yet set to point to a specific row (or has been cleared with an assignment node)

Syntax

IsOnRow(list)

IsOnRow( [Users] ) => yes - when there is actually a specific row selected in the list.

IsOnRow( [Products] ) => no - when there is no current active row in Products.

IsOnRow(reference)

IsOnRow( [CurrentUser-Reference] ) => yes - when the CurrentUser reference field is pointing to an actual row in the Users list.

IsOnRow( [ClearedProduct-Reference] ) => no - when the reference field has been cleared and is not pointing to an actual row in the list.

Parameters

Name
Type
Required
Description

Abs

The Abs() function takes the absolute value of a number.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns an absolute number

Returns Invalid expression if the parameter is not a valid number.

This function uses 32-bit Integers, therefore the range of valid parameters is

-2147483648 and +2147483648

Syntax

Abs(number)

Abs(-123.4567) => 123.4567

Abs(unknownnumber) => Invalid expression

Parameters

Name
Type
Required
Description

Examples

Function call
Result

GetAncestors

The GetAncestors() function returns all the parents (ancestors) of a concept.

Read general information about Concepts and Ontology

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a Concept Set with all the parent concepts of a concept. The concept parameter is not included in the result.

An unknown value is returned if the concept has no parent or the given parameter is unknown.

The function only returns the direct parent of a concept.

Syntax

GetAncestors(concept)

GetAncestors(unknownconcept) =>Result: unknown

GetAncestors('Languages'.'Dutch') =>Result: Languages

GetAncestors('World regions'.'EMEA'.'CIS')

Parameters

Name
Type
Required
Description

PasswordStrength

The PasswordStrength() function Calculates a numeric representation of the strength of a password from 0 (blank), 1 (very weak) up to 5 (very strong).

Combining different types of characters makes for stronger passwords, but a very long password of only lowercase characters (like a sentence) can also be strong.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a number between 0 and 5.

  • 0 - blank

  • 1 - very weak

  • 2 - weak

The following factors increase the strength of a password:

  • Lowercase characters

  • Uppercase characters

Syntax

PasswordStrength(password)

PasswordStrength("") => 0

PasswordStrength("basic") => 1

PasswordStrength("Basic12") => 2

Parameters

Name
Type
Required
Description

List

The List() function creates a list-typed collection of the provided values so it can be used in other functions and features that work with a list. All values must be of the same type.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

A collection of same-typed values that can be used as a list in other functions or list-based features. This list can be iterated through, or a specific item can be accessed using its index-position, or using the Distinct function can be narrowed down to its unique values.

Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.

Syntax

List(value1, value2, ...)

List("Red", "Blue", "Yellow") => a list with 3 text-items

Parameters

Name
Type
Required
Description

Sin

The Sin() function calculates the sine of a number given in radians.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns the sine of a number. Returns Invalid expression if rad has no value.

This function uses 32-bit Integers, therefore the range of valid parameters is

-2147483648 and +2147483648

Syntax

Sin(rad)

Sin(1) => 0.8414709848

Sin() => Invalid expression

Parameters

Name
Type
Required
Description

Examples

Function call
Result

Distinct

The Distinct() function returns a list of unique values from a provided list of values. The list must contain only values of the same type, and they may be numbers, dates, concepts, texts, yes/no booleans.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a collection of values where duplicates are filtered out of.

Syntax

Distinct(values)

Distinct( List(1,2,3,4,1,2,3,4) ) => 1, 2, 3, 4

Distinct([Products.Category] of [Products]) => Monitor, Phone, Printer (when all possible categories in list Products are one of these three values)

Distinct( List( "A", "a", "b", "B", "C", "C", "c") )

Parameters

Name
Type
Required
Description

Password

The Password() function returns a text that contains a randomly generated strong password with a specified number of characters.

This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a text by default of 8 characters. Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.

Syntax

Password()

password() => "6!!Gn.eA"

Password(num_chars)

Password(0) => "G4Q7jC#@97%gYbS3"

Password(4) => "X%9g"

Password(10) => "$3LV3a6asE"

Parameters

Name
Type
Required
Description

Sum

The Sum() function calculates the total value of a list of numbers or durations.

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

Returns a number or duration that is the total value of the given values.

Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

Syntax

Sum(List(values) or [field] of [list])

Sum(List(1, 2, 5)) =>Result: 8

Sum([Products.Price] of [Products])

Parameters

Name
Type
Required
Description

ToConcept

The ToConcept() function returns the concept with the given Local Name or Concept Id.

Be aware that using this function with a Local Name, this can only work if the local name used is unique in the total ontology collection. If there are more than one concept with the same local name that you are looking for, the ToConcept will not work because it searches through all of the Ontology and expects only 1 specific result to return as Concept.

For finding concepts when local name may not be unique and you want to search within a specific parent, we recommend using one of the other Concept Functions available, where you can search more specifically, like or .

FileUrl

The FileUrl() function returns the URL of a file.

Optionally - with the second parameter includeDomain set to true - it will return the URL including the full domain so it can be used externally as full absolute path.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

Random

The Random() generates a random number.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

Floor

The Floor() function rounds down to the closest integral number (integer number without decimals) smaller than or equal to the given number.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

Log

The Log() function calculates the natural logarithm (base e) of a given number, or calculates the logarithm of a number by specified base.

Read .

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

CreateJsonWebTokenH256

The CreateJsonWebTokenH256() function returns the HMAC-SHA256 encoded JWT () for given payload (json value) and secret (password text), using the standard JWT header {alg=HS256 and typ=JWT} or a custom header.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

JWT tokens are used in authentication (Single Sign On) contexts, and designed to be compact, URL-safe and secure. Sites like Google or Zoom use JWT. They may provide information on how to work with their JWT for sign-on (with code examples for PHP, Python or C#), and if it supports the standard implementation, you can use this WEM Function to create the proper JWT - just provide the proper values for the payload and the secret. For the extensive standard information behind standard JWT, read the wiki pages.

Date

The Date() function accepts numeric values for each part of a date, optionally with time, and returns it as a datetime value.

This function is NOT SQL compatible. For more information about SQL compatibility, see our .

RowId

The RowId() function returns the ID of the current row of a list.

Any database list also has a numeric [ID] field which holds the numeric primary key value for each row and gets automatically incremented on each add new row action. When you use that ID field in your expressions, you will see it in the form [12345: ID], which does not make it immediately clear which field (or rather, which list) you are pointing to. Other fields use the Technical Name in expressions, which helps to understand where they are coming from. When using the RowId(list) function in expressions, you will see immediately to which list you are referring, so this makes it far more usable.

A RowId of a List-item has multiple forms:
  • directly displaying in a label, will use the ToString() version, and yields the combined identifying information for the List and the Row;

  • with the ToNumber() function, it will yield the numeric id value - same as the numeric [ID] field;

This function is SQL compatible. For more information about SQL compatibility, see our documentation.

The Row ID value of one of the following:

  • The current row of a list (when using the List as parameter)

  • The referenced row of a reference field (when using a reference field as parameter)

Syntax

RowId(list)

RowId( [Users] ) => n196761_2000000001 {for a new row not yet saved}

RowId( [Products] ) => i1428100_2614 as string, when item with id 2614 is the current row => 2614 as numeric

RowId(reference)

RowId( [CurrentProduct-Reference] ) => i1428100_2614 as string, when item with id 2614 is the referenced item => 2614 as numeric

RowId( [ClearedProduct-Reference] ) => unknown - reference is empty, not pointing to a specific row

Parameters

Name
Type
Required
Description

list

List

☑️

a list from the data-model

reference

reference field

☑️

a reference field

Keyword

☑️

the date unit of which the difference is calculated. Possible values: years, months, weeks, day, hour, minute or second.

Keyword

​​☑️

the [date unit] that is moved in date. Possible values: year, month, week, day, hour, minute or second.

Last([name] of [List] WHERE [LastModified] = Max([LastModified] of [List]))

=>
Result: last DateModified value in the indicated list where a certain field has a value

Last([Name] of [Products] WHERE [LastModified] = Max([LastModified] of [Products])) =>Result: returns the name of the last modified item in products

Last([list] where HasValue([field in list])) =>Result: last row in the indicated list where a certain field has a value - ONLY Runtimes 4.2 and up!

values

list or a concept_set

☑️

a collection of values or elements of the same type, or a list of fields from a (persistent) list.

rad

numeric

☑️

a number given in unit of radians

cos(1)

0.5403023059

cos(Pi)

-1

cos(Pi/2)

0

concept

concept

☑️

a single concept, either literal or as expression

list

list

☑️

a database list

reference

reference

☑️

a reference to a row of a database list

number

numeric

☑️

a number.

Sqrt(100)

10

Sqrt(9)

3

Sqrt(2)

1.4142135623731

number

numeric

☑️

a number

Abs(123.456)

123.456

Abs(-123.456)

123.456

Abs(1.23456*10^6)

1234560

3 - medium

  • 4 - strong

  • 5 - very strong

  • Numbers

  • Symbols

  • Password length

  • PasswordStrength("BasicSecret") => 3

    PasswordStrength("*Kky32o7") => 3

    PasswordStrength("BasicSecret1") => 4

    PasswordStrength("this is a very long text with only lowercases") => 5

    PasswordStrength("*Kky32o7+WEsoc!9") => 5

    password

    text

    ☑️

    input password

    List('Color'.'Blue', 'Color'.'Green', 'Color'.'Orange', 'Color'.'Red') => a list with 4 concepts

    Distinct( List( false, false, true, false, true ) ) => a list with 2 boolean values (because of the Distinct function used)

    value1

    any

    ☑️

    Accepts any (at least one) number of values of the same type.

    rad

    numeric

    ☑️

    a number given in unit of radians.

    Sin(0)

    0

    Sin(Pi/2)

    1

    Sin(1)

    0.8414709848078965

    => A, b, C

    Distinct() => Invalid expression

    values

    list

    ☑️

    a list of values or elements of the same type.

    num_chars

    numeric

    ☑️

    a number representing the amount of characters of the generated password. Should be at least 4, higher is better.

    =>
    Result: the summation of all Price-value of all products in the list
    [Products]

    Sum() =>Result: unknown

    values

    list

    ☑️

    the list of values of which the sum is calculated. The values can be either numbers or durations.

    AvailableLanguages
    =>
    Result: unknown

    concept

    concept

    ☑️

    a single concept, either literal or as expression

    GetChildren()

    list

    list

    ☑️

    a list

    reference

    reference

    ☑️

    a reference field pointing to a specific list

    documentation
    =>Result: { 'World regions' , 'EMEA' } as a concept set

    concept

    concept

    ☑️

    a single concept, either literal or as expression

    GetParent()
    Read general information about Concepts and Ontology

    This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns the concept that is found with the given argument.

    Returns Unknown if:

    • the parameter is unknown;

    • if no concept can be found for the provided parameter;

    • if there are multiple matches for the provided parameter (local name).

    Syntax

    ToConcept(localname)

    ToConcept("dutch") =>Result: 'Languages'.'Dutch'

    ToConcept("status") =>Result: unknown when there are multiple concepts with localname status in different parts of the ontology

    ToConcept(unknownstring) =>Result: unknown

    ToConcept(id)

    ToConcept(1467668) =>Result: 'Languages'.'Dutch'

    ToConcept(unknownnumber) =>Result: unknown

    Parameters

    Name
    Type
    Required
    Description

    localname

    text

    ☑️

    text that is used to search the local name of a concept

    id

    numeric

    ☑️

    number that is used to search concept by Concept Id

    FindConcepts
    GetChildren

    Returns the URL that points to the file, by default excluding the hostname (relative path).

    If the second parameter is provided as true, it will include the hostname (full, absolute path).

    Returns Unknown if the parameter value (file) is unknown.

    FileUrl(file)

    FileUrl([PngImageFile]) 👍Result: "/static/files/32655/Logo-WEM.png"

    FileUrl(unknownfile) 👎Result: unknown

    FileUrl(file, includeDomain)

    FileUrl([PngImageFile], true) 👍Result: "https://portal.staging.wem.io/static/files/32655/Logo-WEM.png"

    FileUrl([PngImageFile], false) 👍Result: "/static/files/32655/Logo-WEM.png"

    FileUrl(unknownfile, unknownboolean) 👎Result: unknown

    Parameters

    Name
    Type
    Required
    Description

    file

    file

    ☑️

    the file of which the URL will be returned

    includeDomain

    boolean

    indicate whether or not to include the full domain (default false)

    documentation
    Returns a random integral number between 0 or a specified minimum value, and a maximum value. Returns Invalid expression if one of the parameter values is not a valid number, or is a negative number, or when a maximum value is 0, or when the maximum value is less than the specified minimum value or 0 when only the maximum is specified.

    As of version 4.2, the Random function also accepts negative numbers when both min and max values are provided - just as long as min < max.

    This function uses 32-bit Integers, therefore the range of valid parameters is

    -2147483648 and +2147483648

    Syntax

    Random(max_num)

    Random(100) => 64

    Random() => Invalid expression

    Random(0) => Invalid expression # max_num should be greater than 0

    Random(-10) => Invalid expression # max_num should be greater than 0

    Random(min_num, max_num)

    Random(10, 100) => 67

    Random() => Invalid expression

    Random(-10, 10) => a random value between -10 and 10 (accepted since version 4.2)

    Random(20, 10) => Invalid expression # max_num should be greater than min_num

    Parameters

    Name
    Type
    Required
    Description

    max_num

    numeric

    ☑️

    the maximum value of the generated number.

    min_num

    numeric

    the minimum value of the generated number.

    documentation
    Returns the closest integral value that is smaller than or equal to number. Returns Invalid expression if the parameter is not a valid number.

    This function uses 32-bit Integers, therefore the range of valid parameters is

    -2147483648 and +2147483648

    Syntax

    Floor(number)

    Floor(5.999999999) => 5

    Floor() => Invalid expression

    Parameters

    Name
    Type
    Required
    Description

    number

    numeric

    ☑️

    a numeric value.

    Examples

    Function call
    Result

    Floor(5)

    5

    Floor(5.999)

    5

    Floor(-123.89)

    -124

    documentation

    Returns the logarithm of a givennumber, using base e or a specified base number. Returns Invalid expression if one of the parameter values is not a valid number.

    This function uses 32-bit Integers, therefore the range of valid parameters is

    -2147483648 and +2147483648

    Syntax

    Log(number)

    Log(5) => 1.6094379124

    Log() => Invalid expression

    Log(base, number)

    Log(25, 5) => 2

    Log(5, 25) => 0.5

    Parameters

    Name
    Type
    Required
    Description

    number

    numeric

    ☑️

    a numeric value.

    base

    numeric

    a numeric value.

    Examples

    Function call
    Result

    Log(5)

    1.6094

    Log(25, 5)

    2

    Log(5, 25)

    0.5

    wiki for more info about logarithm
    documentation
    CountryCode(
    (3) ) => { the country code of the third language in the list of available languages }

    language

    languagecode

    ☑️

    Specific language code (available within the Localization folder in the Expression Editor.

    documentation
    CurrentLanguage
    AvailableLanguages

    This WEM implementation is following the basic standards - some sites may have custom implementations that deviate and therefore may not work with the WEM implementation.

    Returns a Json Web Token (wiki) using the HMAC-SHA265 algorithm. Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.

    Syntax

    CreateJsonWebTokenH256(payload, secret, secretisbase64encoded)

    payload= { "sub": "1234567890", "name": "John Doe", "iat": 1516239022 } secret= "12someSecret34" secretisbase64encoded = false

    => eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XKDbghkfPuObFZk-KuHB41t90E2YzIj89byAeqtV6lk

    CreateJsonWebTokenH256(payload, secret, secretisbase64encoded, customheader)

    payload= { "sub": "1234567890", "name": "John Doe", "iat": 1516239022 } secret= "12someSecret34" secretisbase64encoded = false customheader = { "alg": "HS256", "typ": "JWT" }

    => eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XKDbghkfPuObFZk-KuHB41t90E2YzIj89byAeqtV6lk

    Parameters

    Name
    Type
    Required
    Description

    payload

    text

    ☑️

    A json-formed set of claims (see )

    secret

    text

    ☑️

    Text or data field that holds the encryption secret.

    secretisbase64encoded

    JSON Web Token
    documentation
    Returns a Date Time value compiled from the separate input values for each part.

    Returns Unknown if one of the parameter values is unknown or outside the common valid date boundaries.

    Syntax

    Date(year, month, day)

    Date(2022, 2, 17) =>Result: February 17, 2022

    Date(1999, 15, 88) =>Result: unknown

    Date(year, month, day, hour, minute)

    Date(2022, 2, 17, 11, 15) =>Result: February 17, 2022 11:15

    Date(2022, 2, 17, 50, 50) =>Result: unknown

    Date(year, month, day, hour, minute, second)

    Date(2022, 2, 17, 11, 15, 22) =>Result: February 17, 2022 11:15:22

    Date(2022, 2, 17, 15, 80, 80) =>Result: unknown

    Parameters

    Name
    Type
    Required
    Description

    year

    numeric

    ☑️

    the year unit

    month

    numeric

    ☑️

    the month unit (1 - 12)

    day

    documentation

    FindConcepts

    The FindConcepts() function searches concepts by text and/or synonyms within an indicated set.

    Read general information about Concepts and Ontology

    This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns a concept set that contains all the concepts found with the given parameters.

    Returns Unknown if one of the parameter values is unknown, or if the search parameters yield no result.

    Syntax

    FindConcepts(text, concept_set, include_synonyms)

    FindConcepts(unknowntext, unknownconceptset, unknownboolean) =>Result: unknown

    Parameters

    Name
    Type
    Required
    Description

    Pow

    The Pow() function calculates a number to the power of another number.

    The operator ^ can also be used to do power-calculation.

    This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns a number. Returns Invalid expression if one of the parameter values is not a valid number, and returns unknown if one of the parameters is unknown.

    This function uses 32-bit Integers, therefore the range of valid parameters is

    -2147483648 and +2147483648

    Syntax

    Pow(number, power)

    Pow(10, 3) => 1000

    Pow() => Invalid expression

    Parameters

    Name
    Type
    Required
    Description

    Examples

    Function call
    Result

    AesEncrypt

    The AesEncrypt() function generates a base64 encoded ciphertext based on the given plaintext, key and initialization vector.

    This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns a base64 encoded ciphertext Returns invalid keyif the wrong key is used and invalid initialization vector if the wrong vector is used.

    Syntax

    AesEncrypt(plaintext, key, vector)

    AesEncrypt(text, key, vector) => +8oDxXf+w91SR+/AkjpdcLSbygah8m3OQdapwnkAjvY=

    AesEncrypt(plaintext, key, vector, encoding with BOM)

    Parameters

    Name
    Type
    Required
    Description

    Md5

    The Md5() function hashes one or more text strings into one hexadecimal text value which is hashed using the MD5 algorithm.

    This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

    Hashed values cannot be decoded, usually you check an incoming value against a known value that you hash yourself and check if both values are identical, to verify correctness without knowing the actual value.

    Returns a 128-bit hexadecimal representation of an MD5 hashed value. Returns unknownif one of the parameter values is unknown or outside the common valid boundaries.

    Syntax

    Md5(text1[, text2] )

    Md5("") => ""

    Md5("text1", "text2") => "d5730d50d4d8d8dd01f055e633fe35b9"

    Md5(file)

    Md5( [some-specific-file] ) => "a858b7711ea69692d7981bf888de963a"

    Parameters

    Name
    Type
    Required
    Description

    Distance

    The Distance() function returns the geographical distance (in kilometers - as the crow flies) between two points of (latitude,longitude).

    This function is NOT SQL compatible. For more information about SQL compatibility, see our .

    ToNumber

    The ToNumber() converts a value to a number.

    This function is NOT SQL compatible. For more information about SQL compatibility, see our .

    With Modeler v4.4 and Runtimes v5 (August 2025), the ToNumber function got a new overload that accepts a duration and a duration_unit. Older runtimes will show "invalid expression" when this overload is used.

    AesDecrypt

    The AesDecrypt() function decrypts a base64 encoded ciphertext to plaintext, using the given key and initialization vector.

    This function is NOT SQL compatible. For more information about SQL compatibility, see our .

    Round

    The Round() function rounds a number.

    Rounding a number can be done according to different strategies when it comes to the mid-point cases (like x.5).

    WEM supports the Banker's Rounding strategy as default option because of its statistical superiority and standard use in financial and statistical operations.

    From Runtime 4.2 an optional strategy parameter is added to this function. It allows 2 keywords, ToEven (which is default) and

    HmacSha256

    The HmacSha256() function calculates a on provided message using the SHA256 hash function and a key/secret, and returns the calculated MAC as a hexadecimal text string.

    This function is NOT SQL compatible. For more information about SQL compatibility, see our .

    Hashed values cannot be decoded, usually you check an incoming value against a known value that you hash yourself and check if both values are identical, to verify correctness without knowing the actual value.

    Pbkdf2

    The PBKDF2() function creates a secure password hash for a password and a salt by using the PBKDF2 hashing algorithm with 1000 iterations.

    WIKI:

    This function is NOT SQL compatible. For more information about SQL compatibility, see our .

    Hashed values cannot be decoded, usually you check an incoming value against a known value that you hash yourself and check if both values are identical, to verify correctness without knowing the actual value.

    Totp

    The Totp() function calculates a time-based one-time password based on the given secret and given UTC time.

    WIKI:

    MyWEM Forum:

    This function is NOT SQL compatible. For more information about SQL compatibility, see our .

    Sha256

    The Sha256() function hashes a specified text string with SHA256, and returns a hexadecimal text string. This hash function is preferred to SHA-1, being more secure.

    WIKI:

    This function is NOT SQL compatible. For more information about SQL compatibility, see our .

    Hashed values cannot be decoded, usually you check an incoming value against a known value that you hash yourself and check if both values are identical, to verify correctness without knowing the actual value.

    Sha1

    The Sha1() function hashes a specified text string with SHA1, and returns a hexadecimal text string.

    SHA-1 is not considered secure, but some older systems still use this encryption. WEM supports this ONLY at your own risk, and ONLY to be used to integrate with other systems that provide no other way.

    WIKI:

    This function is NOT SQL compatible. For more information about SQL compatibility, see our

    numeric

    ☑️

    the day unit (1 - 31)

    hour

    numeric

    the hour unit (0 - 23)

    minute

    numeric

    the minute unit (0 - 59)

    second

    numeric

    the second unit (0 - 59)

    Pow(1234, 1234)

    infinity

    number

    numeric

    ☑️

    a number

    power

    numeric

    ☑️

    a number

    Pow(1, 0)

    1

    Pow(0, 1)

    0

    Pow(2, 3)

    8

    Pow(0.5, -0.5)

    1.4142135624

    Pow(-0.5, 0.5)

    NaN (not a number)

    yes/no

    ☑️

    indicates whether the secret is base64 encoded (true) or plaintext (false)

    customheader

    text

    You can also use a custom header according to the JWT definition.

    wiki

    Returns a text that contains a hash key of 40 characters. Returns unknown if the salt length is less than 8

    Syntax

    Password(password, salt)

    PBKDF2("*Kky32o7","E1F53135E559C253") => "e28247b343ca7dba657a207efc4c884f582f1b92"

    Parameters

    Name
    Type
    Required
    Description

    password

    text

    ☑️

    text containing a password

    salt

    text

    ☑️

    a salt text. The value must be at least 8 characters long. An unknown value is returned if the length is less than 8.

    http://en.wikipedia.org/wiki/PBKDF2
    documentation

    Returns a text value based on the given secret and UTC time, containing 6 numbers. Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries. May throw a Server500 error when the secret is NOT a proper Base32 value with characters from the collection "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"

    Syntax

    Totp(secret)

    Totp( "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567" ) => "838893" (UtcNow() is implicitly used as date-time value)

    Totp(secret, date)

    Totp("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", Date(2022,05,11,14,15,0)) => "527549"

    Parameters

    Name
    Type
    Required
    Description

    secret

    Base32 text

    ☑️

    secret the password is based on. Must be base32 encoded and must contain any of the characters from the collection as indicated in the syntax example.

    date

    date time

    ☑️

    UTC time or time and interval the password is based on.

    https://en.wikipedia.org/wiki/Time-based_one-time_password
    https://forum.wem.io/link?threadid=184
    documentation

    Returns a hexadecimal text string. Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.

    Syntax

    Sha256(text)

    Sha256("") => "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

    Sha256("The quick brown fox jumps over the lazy dog.") => "ef537f25c895bfa782526529a9b63d97aa631564d5d789c2b765448c8635fb6"

    Parameters

    Name
    Type
    Required
    Description

    text

    text

    ☑️

    a text

    http://en.wikipedia.org/wiki/SHA-2
    documentation
    .

    Hashed values cannot be decoded, usually you check an incoming value against a known value that you hash yourself and check if both values are identical, to verify correctness without knowing the actual value.

    Returns a hexadecimal text string. Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.

    Syntax

    Sha1(text)

    Sha1("text") => 372ea08cab33e71c02c651dbc83a474d32c676ea

    Parameters

    Name
    Type
    Required
    Description

    text

    text

    ☑️

    a text

    https://en.wikipedia.org/wiki/SHA-1
    documentation

    ProjectId

    The ProjectId() function gets the id of the current project.

    This function is SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns a text of the current project id.

    Syntax

    ProjectId()

    ProjectId() 👍Result: 34372

    FindConcepts("not part of set", GetChildren('Devices'), false) =>Result: unknown

    FindConcepts("screen", GetChildren('Devices'), true) =>Result: 'Monitor'

    FindConcepts("screen", GetChildren('Devices'), false) =>Result: unknown

    FindConcepts("Monitor", GetChildren('Devices'), false) =>Result: 'Monitor'

    ☑️

    either true or false, which indicates if synonyms must be included in the filter or not.

    text

    text

    ☑️

    text to search for in names (local/display) and optionally synonyms

    concept_set

    list of concepts

    ☑️

    a concept set as source for the search

    include_synonyms

    Yes/No

    Md5("The quick brown fox jumps over the lazy dog.") => "e4d909c290d0fb1ca068ffaddf22cbd0"

    ☑️

    a file

    text1

    text

    ☑️

    a text

    text2

    text

    another text

    file

    file

    AesEncrypt(text, key, vector, false) => e3ieQNh8nKH/pHImo+JQmZvr+rhSGn4WHQJyTBmPCbA=

    ☑️

    Text or data field that holds the encryption vector. A proper Vector value can be generated using

    encoding with BOM

    yes/no

    enable or disable encoding with BOM (check the receiving party if BOM is required/expected).

    plaintext

    text

    ☑️

    The text to encrypt.

    key

    text

    ☑️

    Text or data field that holds the encryption key. A key can be generated using AesKey()

    vector

    text

    Returns the geographical distance (in kilometers - in a straight line) between two geographical points. Returns Invalid expression if one of the parameter values is not a valid number.

    Syntax

    Distance(latitude1, longtitude1, latitude2, longtitude2)

    Distance(52.349979, 4.894523, 48.858876, 2.293388) => 429.3167582358 (the distance between WEM HQ and the Eifel Tower)

    Distance() => Invalid expression

    Parameters

    Name
    Type
    Required
    Description

    latitude1

    numeric

    ☑️

    a geographic coordinate that specifies the north–south position of a point on the Earth's surface in decimal degrees.

    longtitude1

    numeric

    ☑️

    a geographic coordinate that specifies the east-west position of a point on the Earth's surface decimal degrees.

    latitude2

    Example

    Function call
    Result

    Distance(52.370216, 4.895168, -37.814, 14496332)

    16545.7337

    documentation

    Note: this function uses the language setting of a portal when converting text.

    Returns the number converted from text or a unit from date. Returns Invalid expression when text is not a number, or when reference is not a valid RowId, or when date is not a valid date value or unit is not a valid date unit.

    Syntax

    ToNumber(text)

    ToNumber("1.34") => 1.34

    ToNumber("a123b456") => Invalid expression

    ToNumber(unknowntext) => unknown

    ToNumber(reference)

    ToNumber([reference-field to currentrow of a list]) => [the numeric ID value of the current row]

    ToNumber(date, date_unit)

    ToNumber(date(2015,9,26,15,46,29), day) => 269

    ToNumber() => Invalid expression

    ToNumber(duration, duration_unit)

    ToNumber(ToDuration("0.00:02:14.12"), millisecond) => 134120

    This implementation only works on Kubernetes Runtimes version 5 and up!

    Duration units: day - results in the total number of days hour - results in the total number of hours minute - results in the total number of minutes second - results in the total number of seconds millisecond - results in the total number of milliseconds

    Parameters

    Name
    Type
    Required
    Description

    text

    text

    ☑️

    a text containing a number.

    reference

    reference

    ☑️

    reference field, holding a rowid of a list.

    date

    documentation
    Returns a plaintext. Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.

    Syntax

    AesDecrypt(ciphertext, key, vector)

    ciphertext = "e3ieQNh8nKH/pHImo+JQmZvr+rhSGn4WHQJyTBmPCbA=" key = "77616d666c51673763346e764b6c725242313668357a7a597131515a78303733" vector = "00000000000000000000000000000000"

    AesDecrypt(ciphertext, key, vector) => "abcdefghijklmnopqrstuvwxyz"

    AesDecrypt(ciphertext, key, vector, encoding with BOM)

    ciphertext = "e3ieQNh8nKH/pHImo+JQmZvr+rhSGn4WHQJyTBmPCbA=" key = "77616d666c51673763346e764b6c725242313668357a7a597131515a78303733" vector = "00000000000000000000000000000000"

    AesDecrypt(ciphertext, key, vector, false) => "abcdefghijklmnopqrstuvwxyz"

    ciphertext BOM = "+8oDxXf+w91SR+/AkjpdcLSbygah8m3OQdapwnkAjvY="

    AesDecrypt(ciphertext, key, vector, true) => "abcdefghijklmnopqrstuvwxyz"

    Parameters

    Name
    Type
    Required
    Description

    ciphertext

    text

    ☑️

    The input base64 encoded text which was encrypted you want to decrypt. It should be encrypted with the same key and vector values and using the AES algorithm.

    key

    text

    ☑️

    Text or data field that holds the encryption key. A key can be generated using

    vector

    documentation
    AwayFromZero
    , (new option) that can be set as optional 3rd parameter in the expression if the AwayFromZero strategy is the desired Rounding feature for your application.

    Mind, this only applies to the Mid-Point values: the middle of the spectrum, where a decision needs to be made which way to go. So if you expect 3.85 to be rounded to 3.9 (away from zero), you need to use the AwayFromZero in the expression - the default ToEven will result in 3.8 (Banker's).

    Read this wiki page about rounding strategies.

    This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns a number that is rounded to an integral number or a number of fractional digits. Returns Invalid expression if one of the parameter values is not a valid number.

    This function uses 32-bit Integers, therefore the range of valid parameters is

    -2147483648 and +2147483648

    Syntax

    Round(number)

    Round(1.523) => 2

    Round() => Invalid expression

    Round(number, digits)

    Round(3.141592, 2) => 3.14

    Round() => Invalid expression

    Round(number, digits, strategy) /* Runtime 4.2 only! */

    Round(3.141592, 2, ToEven) => 3.14

    Round(3.85, 1, ToEven) => 3.8

    Round(3.85, 1, AwayFromZero) => 3.9

    Parameters

    Name
    Type
    Required
    Description

    number

    numeric

    ☑️

    a number

    digits

    numeric

    the number of fractional digits number is rounded.

    strategy

    Examples

    Function call
    Result

    Round(5.499)

    5

    Round(5.501)

    6

    Round(3.85, 1)

    3.8

    Round(5.489, 2)

    5.49

    Round(5.499, 2)

    5.50

    Returns a hexadecimal text representation of a message, which is hashed using the Sha265 function and the key/secret for additional calculation/hashing. Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.

    Syntax

    HmacSha256(key, message)

    HmacSha256("", "") => "b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad"

    HmacSha256("key", "The quick brown fox jumps over the lazy dog") => "f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8"

    HmacSha256(key, message, returnasbase64)

    HmacSha256("Secret Key", "testing the hmacsha265 converter", true) => "hhG+nxnGLS4pT5DVoMyP8VoNrpbnkNaK8e7g5COSb+A="

    HmacSha256("Secret Key", "testing the hmacsha265 converter", false) => "8611be9f19c62d2e294f90d5a0cc8ff15a0dae96e790d68af1eee0e423926fe0"

    Parameters

    Name
    Type
    Required
    Description

    key

    text

    ☑️

    a text with the secret key for HmacSha256 encryption

    message

    text

    ☑️

    the message or content

    returnbase64

    MAC (message authentication code)
    documentation

    ToDuration

    The ToDuration() function converts provided input to a specific Duration value. Possible values are a string ("dd.HH:mm:ss.fff"), ticks, a number with specified date-unit or specific numeric values for days, hours, minutes, seconds and milliseconds.

    This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.

    Returns a Duration value compiled from the input values.

    Returns Unknown if one of the parameter values is unknown or outside the common valid boundaries.

    Syntax

    ToDuration(text)

    ToDuration("6.12:14:45") =>Result: 6 days, 12 hours, 14 minutes and 45 seconds (mark the dot between day and hour)

    ToDuration("12:14") =>Result: 12 hours and 14 minutes

    ToDuration(ticks)

    There are 10 thousand ticks in one millisecond, 10 million ticks in one second, 600 million ticks in one minute.

    ToDuration(650000000) 👍Result: 1 minute and 5 seconds

    ToDuration(50000000) 👍

    ToDuration(number, date_unit)

    ToDuration(6, day) 👍Result: 6 days

    ToDuration(12, hour)

    ToDuration(day, hour, minute, second, millisecond)

    Parameters

    Name
    Type
    Required
    Description

    numeric

    ☑️

    a geographic coordinate that specifies the north–south position of a point on the Earth's surface in decimal degrees.

    longtitude2

    numeric

    ☑️

    a geographic coordinate that specifies the east-west position of a point on the Earth's surface decimal degrees.

    date

    ☑️

    a date.

    unit

    date-unit

    ☑️

    the unit that is retrieved from date.

    duration

    duration

    ☑️

    a duration value. supported from runtime v5 invalid expression in older runtimes.

    duration_unit

    duration-unit

    ☑️

    Duration units: day - results in the total number of days hour - results in the total number of hours minute - results in the total number of minutes second - results in the total number of seconds millisecond - results in the total number of milliseconds

    keyword

    ToEven (default) or AwayFromZero (Runtime 4.2 only!)

    Round(3.85, 1)

    3.8

    Round(3.85, 1, ToEven)

    3.8 in Runtime 4.2 invalid expression in older runtimes

    Round(3.85, 1, AwayFromZero)

    3.9 in Runtime 4.2 invalid expression in older runtimes

    yes/no

    return result as base64 (if true)

    AesIv()

    text

    ☑️

    Text or data field that holds the encryption vector. A proper Vector value can be generated using AesIv()

    encoding with BOM

    yes/no

    enable or disable encoding with BOM.

    AesKey()

    ToDuration("35:80:90") =>Result: unknown

    Result: 5 seconds

    ToDuration(unknownnumber) 👎Result: unknown

    👍
    Result: 12 hours

    ToDuration(14, minute) 👍Result: 14 minutes

    ToDuration(45, second) 👍Result: 45 seconds

    ToDuration(768, millisecond) 👍Result: 768 milliseconds

    ToDuration(6, 12, 14, 45, 768) 👍Result: 6 days, 12 hours, 14 minutes, 45 seconds and 768 milliseconds

    ToDuration( 0, 0, 14, 45, 0) 👍Result: 14 minutes and 45 seconds

    ☑️

    a numeric value to combine with the date_unit

    date_unit

    keyword

    ☑️

    one of the date_units: day, hour, minute, second, millisecond

    day

    numeric

    ☑️

    the day unit (number of days)

    hour

    numeric

    ☑️

    the hour unit (0 - 23)

    minute

    numeric

    ☑️

    the minute unit (0 - 59)

    second

    numeric

    ☑️

    the second unit (0 - 59)

    millisecond

    numeric

    ☑️

    the millisecond unit (0 - 999)

    text

    text

    ☑️

    text containing duration in dd.HH:mm:ss:fff form

    ticks

    numeric

    ☑️

    the number of ticks (tenthousandth of a millisecond)

    number

    numeric