> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/feature-flags/use-feature-flags/use-ff/ff-creating-flag/add-prerequisites-to-feature-flag.md).

# Add a Prerequisite to a Flag

A Prerequisite is a Feature Flag that you add as a dependency to another Feature Flag. That dependency must be met before that second Feature Flag can be toggled `ON` or `OFF`. For example, if you have a flag that allows users to write Java, the user must be able to read the Java first. Therefore, you add a Prerequisite to the `Write_Java` flag that says the `Read_Java` flag must be enabled before the `Write_Java` flag can be toggled on.

{% hint style="info" %}
At present, Harness currently *does not* support nested prerequities as this functionality is not currently supported.
{% endhint %}

#### Add a Prerequisite <a href="#add-a-prerequisite" id="add-a-prerequisite"></a>

1. Go to the Feature Flag you want to add the Prerequisite to.
2. Select **+ New Prerequisite**.

   ![A screenshot of the Write\_Java Flag with the Prerequisites button highlighted.](/files/3h0iwPzpfG29Y6IVjets)
3. In **Add Prerequisites**, click **+ Prerequisites**.
4. In the first drop-down menu, select the flag you want to use as a Prerequisite.
5. In the second drop-down, select which Variation of the Prerequisite flag must be served before the Feature Flag can be turned on.

   For the example below, the `Read_Java` flag must be set to `True` before this flag can be enabled.
6. Select **Save**. The Prerequisite flag is listed on the Feature Flag page and must be met before you can turn on the Feature Flag.

   !["A screenshot of the Prerequisite flag added to the Write\_Java flag.](/files/MRRgLxCighDQ0zKWwwCc)
