# Multipick Block

The multipick block allows a user to select an item from a predefined list of options, or have an option randomly selected.

<figure><img src="https://3256383364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEEfZP6ffo6mVPfK4pJ0a%2Fuploads%2Fpm1kh79MuD0kEoE07kL2%2FScreenshot%202024-06-12%20at%201.28.20%E2%80%AFPM.png?alt=media&#x26;token=19ec1065-8730-4c00-9ca6-7ab39291dfea" alt="" width="375"><figcaption></figcaption></figure>

**Title**

* Click the pencil icon next to the block’s title to edit it
  * Tip: This is also the block’s variable name, which can be used to dynamically populate data in other blocks.

**Text**

* Enter one dropdown menu option per line
* Use the pipe character "|" to delineate key/value pairs, like "small | 512x512". In the menu, the user would see

## Random mode

Select the `Randomize` option to randomly select an option when the glif is run, without any user input required.

In the "cake/pie" example above, this would result in half of runs using "cake" and half using "pie"

## Key-value mode

<figure><img src="https://3256383364-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEEfZP6ffo6mVPfK4pJ0a%2Fuploads%2FoRRXSGMQF7WP9P0ZjQaR%2FCleanShot%202024-11-15%20at%2014.38.35%402x.png?alt=media&#x26;token=fd44da97-d0da-483f-bbb6-fb7237beb678" alt=""><figcaption></figcaption></figure>

You can also specify key-value pairs using a pipe delimeter (`|`, generally found above the Enter/Return key on most keyboards)

This allows you to show the user a list of options like "small, medium, large" but have those values map to i.e.

```
small | 512x512
medium | 1024x1024
large | 2048x2048
```

It's also possible to have keys correspodn to full JSON objects that you can then combine with the [JSONExtractor block!](https://docs.glif.app/workflow-blocks/tools/json-extractor-block) Very fancy!

```
harry potter | {"class": "wizard", "age": "kid", "gender": "male"}
xena | {"class": "warrior", "age": "young", "gender": "female"}
gandalf | {"class": "wizard", "age": "crazy old", "gender": "istari"}
```
