Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use functions in formula expressions

Focus mode
Use functions in formula expressions - AWS IoT SiteWise

You can use the following functions to operate on data in your formula expressions.

Transforms and metrics support different functions. The following table indicates which types of functions are compatible with each type of formula property.

Note

You can include a maximum of 10 functions in a formula expression.

Function syntax

You can use the following syntax to create functions:

Regular syntax

With the regular syntax, the function name is followed by parentheses with zero or more arguments.

function_name(argument1, argument2, argument3, ...). For example, functions with the regular syntax might look like log(x) and contains(s, substring).

Uniform function call syntax (UFCS)

UFCS enables you to call functions using the syntax for method calls in object-oriented programming. With UFCS, the first argument is followed by dot (.), then the function name and the remaining arguments (if any) inside parentheses.

argument1.function_name(argument2, argument3, ...). For example, functions with UFCS might look like x.log() and s.contains(substring).

You can also use UFCS to chain subsequent functions. AWS IoT SiteWise uses the evaluation result of the current function as the first argument for the next function.

For example, you can use message.jp('$.status').lower().contains('fail') instead of contains(lower(jp(message, '$.status')),'fail').

For more information, visit the D Programming Language website.

Note

You can use UFCS for all AWS IoT SiteWise functions.

AWS IoT SiteWise functions are not case sensitive. For example, you can use lower(s) and Lower(s) interchangeably.

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.