DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Performs the modulo operation on two numeric arguments and returns the remainder. The function can handle both integer and floating-point numbers, and attempts to convert strings to numbers.
This helper is available in the Winter ’26 release of Marketing Cloud Next (API version 65.0).
1{{modulo value1 value2}}| Parameter | Type | Description |
|---|---|---|
value1 | Number or String | Required. The first value (dividend). Must be a number or convertible to a number. |
value2 | Number or String | Required. The second value (divisor). Must be a number or convertible to a number, and can’t be 0. |
The function returns the remainder of the division operation. If you provide more than two arguments, the operation uses only the first two. The result is always a number rounded to 2 decimal places. If you divide by 0, the operation throws an exception.
If either input is a string, the operation tries to convert it to a number. If a string value can’t be converted to a number, the operation throws an exception. Division by zero throws an exception.