Docs: Mention queryparam function (#54526)

* Update data-link-variables.md

Add queryparam function and tables of output to match the other listed variables

* Update docs/sources/linking/data-link-variables.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Add r4j4h's suggestions to the new documentation space with some partial changes to the wording

* Add r4j4h's suggestions to the new documentation space with some partial changes to the wording

* mockery generated code as it is on main

* simplify changes in docs and go straight to the point

Co-authored-by: Jasmine Hegman <jasmine@jhegman.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
This commit is contained in:
Polina Boneva 2022-09-08 17:14:37 +03:00 committed by GitHub
parent 8f0473aa3e
commit 2f16c27e35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,9 +66,15 @@ Value-specific variables are available under `__value` namespace:
When linking to another dashboard that uses template variables, select variable values for whoever clicks the link.
`${myvar:queryparam}` - where `myvar` is a name of the template variable that matches one in the current dashboard that you want to use.
`${var-myvar:queryparam}` - where `var-myvar` is the name of the template variable that matches one in the current dashboard that you want to use.
If you want to add all of the current dashboard's variables to the URL, then use `__all_variables`.
| Variable state | Result in the created URL |
| ------------------------ | ----------------------------------- |
| selected one value | `var-myvar=value1` |
| selected multiple values | `var-myvar=value1&var-myvar=value2` |
| selected `All` | `var-myvar=All` |
If you want to add all of the current dashboard's variables to the URL, then use `${__all_variables}`.
## Data links