高度な式エディターの構文 syntax
高度な式エディターを使用する際の構文の基本事項を以下に示します。
括弧と式の優先度 parentheses-and-expression-priority
括弧を使用すると、複雑な式が読みやすくなります。 (<expression>) は <expression>と同等です。 括弧を使用して、評価順序と結合規則を定義することもできます。
式は左から右に評価されます。 演算子の結合規則を適用する必要があります。乗算と除算は、加算と減算よりも優先されます。 特定の順序を強制するには、括弧を追加して演算を区切る必要があります。 次に例を示します。
4 + 2 * 10- 「*」は「+」よりも優先されます:2 * 10 の評価結果は → 20
- 4 + 20 → 24
(4 + 2) * 10- 括弧によって優先度が変わります:(4 + 2) の評価結果は → 6
- 6 * 10 → 60
大文字と小文字の区別 case-sensitivity
大文字と小文字の区別に関する様々なルールを次に示します。
- すべての演算子(および、またはなど) 小文字にする必要があります。 例:
<expression1>and<expression2>は有効な式であるのに対して、<expression1>AND<expression2>は有効な式ではありません。 - すべての関数名では大文字と小文字が区別されます。 例:inAudience() は有効なのに対して、INAUDIENCE() 関数は有効ではありません。
- フィールド参照と定数値は、大文字と小文字が区別されます。(演算子や関数とは異なり)これらは言語のビルトインの要素ではなく、エンドユーザーが作成します。
式の戻り値のタイプ returned-expression-type
使用コンテキストに応じて、式エディターは異なる値を返す可能性があります。
This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.
For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.
- TL;DR: This page covers the core syntax rules of the Journey advanced expression editor — operator precedence with parentheses, case sensitivity for operators and functions, and the expected return type for each editor context.
Intents:
- Control expression evaluation order by wrapping sub-expressions in parentheses
- Write operators (
and,or,not) in lowercase to avoid syntax errors - Use correctly cased function names (e.g.
inAudience()notINAUDIENCE()) - Understand that conditions must return a boolean, custom timers must return
dateTimeOnly, and action parameter mappings can return any type
Glossary:
- Expression priority: The order in which operators are evaluated; multiplications and divisions take priority over additions and subtractions (product-specific)
- Case sensitivity: In the advanced editor, operators must be lowercase, function names are case-sensitive, and field references are case-sensitive as authored by the user (product-specific)
- dateTimeOnly: The return type required for custom timer (Wait activity) expressions; represents a date-time without a timezone (product-specific)
Guardrails:
- Operators (
and,or,not, etc.) must be written in lowercase — uppercase variants are invalid - All function names are case-sensitive —
inAudience()is valid butINAUDIENCE()is not - Arithmetic follows standard precedence:
*and/evaluate before+and-; use parentheses to override - Conditions always return a boolean; custom timers always return
dateTimeOnly
Terminology:
- Canonical name: Advanced Expression Editor Syntax — Acronym: none — variants: expression syntax, editor syntax
- Synonyms: “expression priority” = “operator precedence”; “parentheses” = “brackets” (in expression context)
- Do not confuse: operator case sensitivity (operators must be lowercase) ≠ field reference case sensitivity (field names are user-authored and case-sensitive as written)
FAQ:
- Q: Does
4 + 2 * 10evaluate to 60 or 24? — It evaluates to 24 because*takes priority over+; use(4 + 2) * 10to get 60. - Q: Can I write
ANDin uppercase in an expression? — No; all operators must be lowercase (and,or,not). - Q: Are function names case-sensitive? — Yes;
inAudience()is valid butINAUDIENCE()is not. - Q: What type must a condition expression return? — A boolean.
- Q: What return type is required for a custom Wait activity timer expression? —
dateTimeOnly.