연산자 operators
연산자에는 단항 연산자와 이항 연산자의 두 종류가 있다. 왼쪽 단항 연산자와 오른쪽 단항 연산자가 있습니다.
// left-hand unary operators
// <operator> <operand>
// operand is an expression
not (@event{LobbyBeacon.endUserIDs._experience.emailid.id}=="example@adobe.com")
// right-hand unary operators
// <operator> <operand>
// operand is an expression
@event{LobbyBeacon.endUserIDs._experience.emailid.id} is not null
// binary operators
// <operand1> <operator> <operand2>
// operand is an expression
(@event{LobbyBeacon.endUserIDs._experience.emailid.id}=="example1@adobe.com") or (@event{LobbyBeacon.endUserIDs._experience.emailid.id}=="example2@adobe.com")
중요 정보 important-notes
-
곱셈(
*)을 사용할 때는 두 연산 필드의 형식이 같아야 합니다(정수 또는 십진수). 예 :- 다음 예제는 올바릅니다.
3.0 * 4.0 3 * 4.0에 오류가 발생합니다.
- 다음 예제는 올바릅니다.
-
+연산자를 사용하는 경우 식을 괄호로 묶어야 합니다. 예:toDateTimeOnly(toDateTime((currentTimeInMillis()) + 1))이(가) 올바릅니다.toDateTimeOnly(toDateTime(currentTimeInMillis() + 1))에 오류가 발생합니다.
논리적 logical
및
<expression1> and <expression2>
<expression1>과 <expression2> 모두 부울이어야 합니다. 결과는 부울입니다.
예:
3.14 > 2 and 3.15 < 1
또는
<expression1> or <expression2>
<expression1>과 <expression2> 모두 부울이어야 합니다. 결과는 부울입니다.
예:
3.14 > 2 or 3.15 < 1
아님
not <expression>
<expression>은(는) 부울이어야 합니다. 결과는 부울입니다.
예:
not 3.15 < 1
비교 comparison
null임
<expression> is null
결과는 부울입니다.
null은 표현식에 평가된 값이 없음을 의미합니다.
예:
@event{BarBeacon.location} is null
null이 아님
<expression> is not null
결과는 부울입니다.
null은 표현식에 평가된 값이 없음을 의미합니다.
예:
@event{BarBeacon.location} is not null
이(가) null임
<expression> has null
<expression>은(는) 목록이어야 합니다. 결과는 부울입니다.
목록에 Null 값이 하나 이상 포함되어 있음을 식별하는 데 유용합니다.
예:
["foo", "bar", null] has null
true 반환
["foo", "bar", ""] has null
""가 null로 간주되지 않으므로 false를 반환합니다.
==
<expression1> == <expression2>
예:
3.14 == 42
"foo" == "bar"
!=
<expression1> != <expression2>
결과는 부울입니다.
예:
3.14 != 42
"foo" != "bar"
>
<expression1> > <expression2>
Datetime은 Datetime과 비교할 수 있습니다.
Datetimeonly는 Datetimeonly와 비교할 수 있습니다.
정수나 십진수는 모두 정수나 십진수와 비교할 수 있습니다.
다른 조합은 사용할 수 없습니다.
결과는 부울입니다.
예:
3.14 > 42
>=
<expression1> >= <expression2>
Datetime은 Datetime과 비교할 수 있습니다.
Datetimeonly는 Datetimeonly와 비교할 수 있습니다.
정수나 십진수는 모두 정수나 십진수와 비교할 수 있습니다.
다른 조합은 사용할 수 없습니다.
결과는 부울입니다.
예:
42 >= 3.14
<
<expression1> < <expression2>
Datetime은 Datetime과 비교할 수 있습니다.
Datetimeonly는 Datetimeonly와 비교할 수 있습니다.
정수나 십진수는 모두 정수나 십진수와 비교할 수 있습니다.
다른 조합은 사용할 수 없습니다.
결과는 부울입니다.
예:
42 < 3.14
<=
<expression1> <= <expression2>
Datetime은 Datetime과 비교할 수 있습니다.
Datetimeonly는 Datetimeonly와 비교할 수 있습니다.
정수나 십진수는 모두 정수나 십진수와 비교할 수 있습니다.
다른 조합은 사용할 수 없습니다.
결과는 부울입니다.
예:
42 <= 3.14
산술 arithmetic
+
<expression1> + <expression2>
두 표현식은 모두 숫자(정수 또는 십진수)여야 합니다.
결과도 숫자입니다.
예:
1 + 2
반환 3
-
<expression1> - <expression2>
두 표현식은 모두 숫자(정수 또는 십진수)여야 합니다.
결과도 숫자입니다.
예:
2 - 1
1 반환
/
<expression1> / <expression2>
두 표현식은 모두 숫자(정수 또는 십진수)여야 합니다.
결과도 숫자입니다.
<expression2>는 0이 아니어야 합니다(반환 0).
예:
4 / 2
반환 2
*
<expression1> * <expression2>
두 표현식은 모두 숫자(정수 또는 십진수)여야 합니다.
결과도 숫자입니다.
예:
3 * 4
12 반환
%
<expression1> % <expression2>
두 표현식은 모두 숫자(정수 또는 십진수)여야 합니다.
결과도 숫자입니다.
예:
3 % 2
1을 반환합니다.
수학 math
숫자임
<expression> is numeric
식의 형식은 정수 또는 십진수입니다.
예:
@ is numeric
정수
<expression> is integer
식의 유형은 정수입니다.
예:
@ is integer
소수임
<expression> is decimal
식의 형식은 십진수입니다.
예:
@ is decimal
문자열 string
+
<string> + <expression>
<expression> + <string>
두 표현식을 연결합니다.
하나의 식은 체인 문자열이어야 합니다.
예:
"the current time is " + (now())
“현재 시간은 2023-09-23T09:30:06.693Z"를 반환합니다.”
(now()) + " is the current time"
“2023-09-23T09:30:06.693Z는 현재 시간” 반환
"a" + "b" + "c" + 1234
"abc1234"를 반환합니다.
일자 date
+
<expression> + <duration>
dateTime, dateTimeOnly 또는 duration에 duration을 추가합니다.
예:
(toDateTime("2023-12-03T15:15:30Z")) + (toDuration("PT15M"))
dateTime 2023-12-03T15:30:30Z 반환
(toDateTimeOnly("2023-12-03T15:15:30")) + (toDuration("PT15M"))
dateTimeOnly 2023-12-03T15:30:30 반환
(now()) + (toDuration("PT1H"))
현재 시간으로부터 1시간 후 dateTime(UTC 시간대 포함)을 반환합니다.
(toDuration("PT1H")) + (toDuration("PT1H"))
duration PT2H 반환
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 is a complete reference of operators available in the Journey advanced expression editor, covering logical (
and,or,not), comparison (==,!=,>,>=,<,<=,is null,is not null,has null), arithmetic (+,-,/,*,%), math type-check (is numeric,is integer,is decimal), string concatenation, and date arithmetic operators.
Intents:
- Combine boolean conditions using logical operators
and,or, andnot - Check whether a field or expression value is null or not null using
is null/is not null - Detect null values within a list using the
has nulloperator - Compare numeric, datetime, and datetimeonly values using
>,>=,<,<=,==, and!= - Perform arithmetic on numeric values using
+,-,/,*, and% - Add a duration to a dateTime, dateTimeOnly, or duration value using the
+operator
Glossary:
- Unary operator: An operator applied to a single operand; can be left-hand (e.g.
not) or right-hand (e.g.is null) (product-specific) - Binary operator: An operator applied between two operands (e.g.
and,==,+) (product-specific) - has null: A right-hand unary operator that returns true if a list contains at least one null element (product-specific)
- is numeric / is integer / is decimal: Type-check operators that return a boolean based on the numeric subtype of the expression (product-specific)
Guardrails:
- When using multiplication (
*), both operands must be the same numeric type (both integer or both decimal) — mixing types causes an error - When using the
+operator for date arithmetic, the expression must be wrapped in parentheses to avoid parsing errors - Comparison operators (
>,>=,<,<=) are only valid between compatible types: Datetime with Datetime, DatetimeOnly with DatetimeOnly, or numeric with numeric — any other combination is forbidden - An empty string
""is not considered null —has nullreturns false for a list containing"" - The
==and!=operators perform no data type control between operands
Terminology:
- Canonical name: Operators — Acronym: none — variants: expression operators, journey operators
- Synonyms:
and= “logical AND”;or= “logical OR”;not= “logical NOT”;%= “modulo” - Do not confuse:
is null(expression has no evaluated value) ≠== null(not a valid syntax);has null(list contains null) ≠is null(expression itself is null)
FAQ:
- Q: Can I multiply an integer by a decimal directly? — No; both operands of
*must be the same type. Use3.0 * 4.0(both decimal) or3 * 4(both integer). - Q: How do I add 15 minutes to a dateTime? — Use
(toDateTime("...")) + (toDuration("PT15M")). - Q: What is the difference between
is nullandhas null? —is nullchecks whether a single expression has no evaluated value;has nullchecks whether a list contains at least one null element. - Q: Does
"" has nullreturn true? — No; an empty string is not considered null, so the result is false. - Q: Why does
3 * 4.0cause an error? — The*operator requires both operands to be the same numeric type; mixing integer and decimal is not allowed.