# How to pass the value of filter group, in the canvas expression editor

**URL:** <https://discuss.elastic.co/t/how-to-pass-the-value-of-filter-group-in-the-canvas-expression-editor/336773>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [June 23, 2023, 12:43pm UTC](https://discuss.elastic.co/t/how-to-pass-the-value-of-filter-group-in-the-canvas-expression-editor/336773 "2023-06-23T12:43:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhavya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavya/32/45679_2.png) [@bhavya](https://discuss.elastic.co/u/bhavya)\
**Post date:** [June 23, 2023, 12:43pm UTC](https://discuss.elastic.co/t/how-to-pass-the-value-of-filter-group-in-the-canvas-expression-editor/336773/1 "2023-06-23T12:43:55Z")

</div>

I have created a dropdown in canvas workpad, having values of `company.name` field. The name of the `filterGroup` is `customerGroup`

Lets say the values in the dropdown are: "xyz" and "ABC"

**I want to show the asset only if the company name, that I get from the query level is equal to the one that I have selected in the dropdown.**

I am trying to achieve that using the below expression

The expression is :

```auto
filters
| essql 
  query="SELECT * FROM \"xyz-prod-logs\" WHERE \"@timestamp\" > NOW() - INTERVAL 2 MONTH and \"@timestamp\" < NOW() - INTERVAL 1 MONTH ORDER BY \"@timestamp\""
| mapColumn "markdown_content" 
  fn={getCell "company.name" | if {compare "eq" to={filters group="customerGroup"}} then={string "[![](" {asset "asset-3d0ad912-1b2f-460f-a463-d23ef9a7062f"} ")]"} else=""}
| markdown {getCell "markdown_content"}
| render

```

In the above expression if I replace `{filters group="customerGroup"}` to "xyz", then the expression is working correctly.

How can I pass the selected value of dropdown, in the canvas expression editor ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 21, 2023, 12:44pm UTC](https://discuss.elastic.co/t/how-to-pass-the-value-of-filter-group-in-the-canvas-expression-editor/336773/2 "2023-07-21T12:44:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
