# Reusable Logic Configs

If you have variables or configuration that are too large or complex to define in your rules directly, you can leverage **configs** to define that information for your rules to access in an efficient way.

## Set up a Config

To set up a config, navigate to your form logic rules and click on the **Settings** button. This will open a pop-up that gives you an option to upload your config in CSV format. A typical workflow is:

1. Define your configuration in a spreadsheet (e.g. a list of stores by region, list of activities by time, etc). Make sure the first row of your CSV is a list of column headers.
2. Export the spreadsheet to a CSV and upload it to Feathery.
3. Feathery automatically stores and indexes your uploaded data, making it available to efficiently query from your rule itself. The data is formatted as an array of objects, where each object is a row of the spreadsheet that maps from a sepcific header to the value for that specific row and column.

<figure><img src="/files/gKNnX0vWEzQFTgoc3Enz" alt=""><figcaption></figcaption></figure>

## Use Configs in a Logic Rule

To use a config in your logic rule, you can leverage the `feathery.getConfig({filter, keys, unique})`  method in your rule.

* `filter`: A map from spreadsheet headers to the values that rows being returned must contain. If not specified, all config values will be returned.
* `keys` : A list of spreadsheet columns to be returned. If not specified, all columns will be returned.
* `unique` : Only return spreadsheet rows with unique sets of values to be returned.

Make sure to `await` the promise returned from the method to get the actual values to use.


---

# 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.feathery.io/platform/build-forms/advanced-logic/javascript-rule-builder/reusable-logic-configs.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.
