使用「+」運運算元建立運算式時封裝函式
使用"+"運運算元時,任何函式呼叫都必須以括弧封裝。
說明 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"))
相關閱讀
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f