# Variables

{% embed url="<https://www.loom.com/share/78c5cf15ee2140da90708e48d0bf8644>" %}

Instead of repeating the same [logic](/concepts/logic.md) for multiple flags, e.g. the same list of user IDs, you can extract common logic into variables to reuse.

To create a reusable variable, e.g. for a list of user IDs, first set up your targeting logic as normal for one flag, adding a rule that uses this list of IDs.

Then open the context menu on the list of IDs and convert it to a variable.

The list will be replaced with a reference to the new variable.

You can navigate to the variable to view and edit this list.

And you can reference this variable when adding rules to any of your other flags.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hypertune.com/concepts/variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
