# Urlparams syntax

**URL:** <https://discuss.elastic.co/t/urlparams-syntax/212891>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [December 23, 2019, 7:49pm UTC](https://discuss.elastic.co/t/urlparams-syntax/212891 "2019-12-23T19:49:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [December 27, 2019, 12:35pm UTC](https://discuss.elastic.co/t/urlparams-syntax/212891/2 "2019-12-27T12:35:13Z")

</div>

Here is all I could find on `urlparam`

> **[Canvas function reference | Kibana Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/kibana/current/canvas-function-reference.html#urlparam_fn)**

> [@Global Variables in Canvas](https://discuss.elastic.co/t/global-variables-in-canvas/169871/3):
>
> @JamesNotJamez There's not a way to create a "global" value directly, but you could perhaps use the urlparam function as a substitute here. That function allows you to read a value from query params in the URL. When you have a workpad open, the URL in your browser should look something like this: http://localhost:5601/app/canvas#/workpad/... You can add query params before the # in there, like so: http://localhost:5601/app/canvas?target=5000#/workpad/ So now you have a query param named targ…

> [@Using urlparam in an Elasticsearch SQL query in Kibana Canvas](https://discuss.elastic.co/t/using-urlparam-in-an-elasticsearch-sql-query-in-kibana-canvas/204816/2):
>
> Hey @Sahiru_Gunawardene, welcome to the discussion boards! Give this syntax a try. I do want to caution you though -- this is widely considered unsafe, as you are taking data from the URL (which the user controls) and injecting it into a SQL query: filters | essql query={string "SELECT project, release, sum(effort) FROM my\_index where field= '" {urlparam param=varFromURL default=1000} "' group by field1, field2" | table | render

I could not get `urlparam` working in a where clause of an SQL statement.

Can you open an issue at [Sign in to GitHub · GitHub](https://github.com/elastic/kibana/issues/new?template=Bug_report.md)?

---

_[View the full topic](https://discuss.elastic.co/t/urlparams-syntax/212891)._
