Random

Built-in step · 4 steps

Pick random numbers or items.

Steps

StepWhat it does
Generate a unique IDGenerate a unique identifier to use as a reference or order number: a random UUID by default, or a short alphanumeric code for human-facing codes.
Pick a random decimal numberPick a random decimal number between two numbers.
Pick a random numberPick a random number between two numbers (no decimals).
Pick random itemsRandomly choose items from a list, like drawing names from a hat.

Generate a unique ID

Generate a unique identifier to use as a reference or order number: a random UUID by default, or a short alphanumeric code for human-facing codes.

Inputs

Formatformattext
The kind of ID to generate.One of: uuid, short (Short code). Default: uuid.

Outputs

A random ID: a UUID, or for the short format, an 8-character code of capital letters and digits.

Example output
"f47ac10b-58cc-4372-a567-0e02b2c3d479"

Pick a random decimal number

Pick a random decimal number between two numbers.

Inputs

Smallest numberminimumnumberRequired
This number can be picked.
Largest numbermaximumnumberRequired
This number won't be picked.

Outputs

A random decimal number from the minimum up to, but not including, the maximum.

Example output
3.7215

Pick a random number

Pick a random number between two numbers (no decimals).

Inputs

Smallest numberminimumnumberRequired
This number can be picked.
Largest numbermaximumnumberRequired
This number can be picked.

Outputs

A random whole number between the minimum and maximum, both included.

Example output
7

Pick random items

Randomly choose items from a list, like drawing names from a hat. Each item can only be picked once.

Inputs

ListvalueslistRequired
The list to pick items from.
Number of itemsnnumberRequired
How many items to pick. Asking for more than the list holds gives the whole list, shuffled.

Outputs

That many items picked at random from the list, each one at most once. The whole list, shuffled, if it has fewer items.

Example output
[
  "Raj",
  "Ana"
]

On this page