使用“+”运算符构建表达式时封装函数

使用“+”运算符时,任何函数调用都必须用括号封装。

描述 description

环境

Adobe Journey Optimizer版本23.10(AJO版本23.10)

问题

如果函数未封装,则使用“+”运算符构建表达式可能会产生错误。

在高级表达式编辑器中,如果构建如下表达式:

toDateTimeOnly(toDateTime(currentTimeInMillis() + 1))

将生成以下错误:

The expression is invalid: You cannot use the character '+' like this because it is a keyword of the language. Please, add quotes to fix your expression.

解决方法 resolution

使用“+”运算符时,任何函数调用都必须用括号封装。

示例:

toDateTimeOnly(toDateTime((currentTimeInMillis()) + 1))
(now()) + (toDuration("PT1H"))

相关阅读

Journey Optimizer指南:运算符:逻辑

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f