# Selecting a variable randomly from "create multiple variables" module?

**URL:** <https://community.make.com/t/selecting-a-variable-randomly-from-create-multiple-variables-module/46587>\
**Category:** Questions\
**Tags:** set-variable, mapping\
**Created:** [July 17, 2024, 9:28pm UTC](https://community.make.com/t/selecting-a-variable-randomly-from-create-multiple-variables-module/46587 "2024-07-17T21:28:19Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 18, 2024, 1:51am UTC](https://community.make.com/t/selecting-a-variable-randomly-from-create-multiple-variables-module/46587/5 "2024-07-18T01:51:14Z")

</div>

You don’t need to use the `random` special variable, or `mod` operator, or even know the LENGTH of the array to “calculate” which random item to use.

All you need is the shuffle and first functions to get a random item from an array.

```plaintext
{{ first(shuffle( 1.array )) }}

```

To answer your original question, you first need to build this ARRAY.

You can use the built-in function `add`,

e.g.:

```plaintext
{{ add(emptyarray; 9.`Worker 1`; 9.`Worker 2`; 9.`Worker 3`) }}

```

Then insert it into the array placeholder in the above example:

`{{ first(shuffle(add(emptyarray; 9.`Worker 1`; 9.`Worker 2`; 9.`Worker 3`))) }}`

For more information, see the function documentation in the [Help Center](https://www.make.com/en/help).

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the [Make Fans](https://samliew.com/make-discord-invite) Discord server to [chat](https://samliew.com/make-discord-invite) with other makers!

---

_[View the full topic](https://community.make.com/t/selecting-a-variable-randomly-from-create-multiple-variables-module/46587)._
