# Adding Data Source

{% embed url="<https://www.youtube.com/watch?v=3dcWDhdcorQ>" %}

Data source is the method which you can pass data into the widget to be displayed.

In the simple case, you would want to create a “Parameter” data source, which is under the Global Data Source.

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

There are a few different parameter type to choose from. It is a good idea to also change the name of the parameter by double clicking at the container bar.

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

Once there is a data source, you can link that information and be displayed in an interface element inside the widget. To do so, select the interface element, under the inspector, look for the parameter that you want to connect to, and click on the tag icon to bring up the list of parameters, and select the value for the desired parameter.

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

If the interface element is something that you can interact with and would be able to enter / adjust the value (so it is not just as a display only), you would want to enable the “two way” option in the parameter such that the interface element can send back the values to the parameter.

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

In the case that you are choosing an Enum as the parameter type, you would need to go into the parameter setting but right clicking on the Enum parameter.

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

A pop up window will appear and this is where you can add and change the keys and values of the Enum.

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


---

# 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://stage-precision.gitbook.io/grid/widget-creation/creating-your-own-widgets/adding-data-source.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.
