# Insert variable by User

**URL:** <https://community.grafana.com/t/insert-variable-by-user/1845>\
**Category:** Grafana\
**Created:** [July 17, 2017, 7:50am UTC](https://community.grafana.com/t/insert-variable-by-user/1845 "2017-07-17T07:50:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@fra](https://community.grafana.com/u/fra)\
**Post date:** [July 17, 2017, 7:50am UTC](https://community.grafana.com/t/insert-variable-by-user/1845/1 "2017-07-17T07:50:55Z")

</div>

Hi all!  
I try to explain my aim/issue…  
I have a MySQL database filled by a Visual Basic application; in this database I have a column where I store a number that represents an “index number” of…(is not important of what… 😉 )  
Then I plot database with Grafana.  
My idea is that User can insert into Grafana panel his interesting index number and Grafana shows only the data with the matching index.  
Grafana query is simply: _SELECT “Column 1”, “Column 2” from “Table” where “Column 1” is not null and “IndexNumber” = "Variable"_  
My issue is how insert that “Variable”…  
Somebody can help me? How can I do to do insert a value from User into Grafana panel?  
Thanks!!!

---

<div class="post-metadata">

**Author:** ![fra](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@fra](https://community.grafana.com/u/fra)\
**Post date:** [July 17, 2017, 1:03pm UTC](https://community.grafana.com/t/insert-variable-by-user/1845/2 "2017-07-17T13:03:48Z")

</div>

Solved 💪🏻:  
Created a new table where I write by Visual Basic the Index Nmber and in Grafana query I write:

_SELECT “Column 1”, “Column 2”, “Index” from “Table”, “TableIndex” where “Column 1” is not null and “Index” = “Column 2”_
