RANDOMIZE
Description
Returns a randomized value of the same data type as the provided input. Supports text, number, date, and boolean values. For text, preserves the case of each character position. For numbers, returns an integer from 0 to the input minus 1.
Syntax
RANDOMIZE(text/number/date/boolean) -> same type as input
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| text/number/date/boolean | String/Number/Date/Boolean | Yes | Value or expression. |
Examples
RANDOMIZE("Hello")
-- Possible output: "Kqsdp". Keeps the letter case of each position.RANDOMIZE(42)
-- Possible output: 17. Returns an integer from 0 to 41.RANDOMIZE(TO_DATE("2025-03-01"))
-- Possible output: 2024-05-14.RANDOMIZE(true)
-- Possible output: false.Tips
This function is only allowed for actions targeting sandboxes, to prevent accidental masking of production data.