diff --git a/docs/sources/dashboards/build-dashboards/create-dynamic-dashboard/index.md b/docs/sources/dashboards/build-dashboards/create-dynamic-dashboard/index.md index 638ed32d79e..f61882de4c3 100644 --- a/docs/sources/dashboards/build-dashboards/create-dynamic-dashboard/index.md +++ b/docs/sources/dashboards/build-dashboards/create-dynamic-dashboard/index.md @@ -326,7 +326,7 @@ When a dashboard is in edit mode, you can undo and redo changes you've made usin When you've made a change and hover the cursor over the buttons, the tooltip displays the change you're about to undo or redo. Also, you can continue undoing or redoing as many changes as you need: -{{< video-embed src="/media/docs/grafana/dashboards/screenrecord-undo-redo-v12.0.mp4" >}} +{{< video-embed src="/media/docs/grafana/dashboards/screen-record-undo-redo-v12.0.mp4" >}} The undo and redo buttons are only available at the dashboard level and only apply to changes made there, such as dashboard layout and grouping and high-level dashboard or panel updates. They aren't visible and don't apply when you're configuring a panel or making changes in the dashboard settings. diff --git a/docs/sources/dashboards/variables/add-template-variables/index.md b/docs/sources/dashboards/variables/add-template-variables/index.md index 38b2bbc27e1..fba0ae43969 100644 --- a/docs/sources/dashboards/variables/add-template-variables/index.md +++ b/docs/sources/dashboards/variables/add-template-variables/index.md @@ -351,6 +351,23 @@ InfluxDB and Prometheus use regular expressions, so the same variable would be i Elasticsearch uses Lucene query syntax, so the same variable would be formatted as `("host1" OR "host2" OR "host3")`. In this case, every value must be escaped so that the value only contains Lucene control words and quotation marks. +#### Variable indexing + +If you have a multi-value variable that's formatted as an array, you can use array positions to reference the values rather than the actual values. +You can use this functionality in dashboard panels to filter data, and when you do so, the array is maintained. + +To reference variable values this way, use the following syntax: + +```text +${query0.0} +``` + +The preceding syntax references the first, or `0`, position in the array. + +In the following example, there's an array of three values, `1t`, `2t`, and `3t`, and rather than referencing those values, the panel query references the second value in the array using the syntax `${query0.1}`: + +{{< figure src="/media/docs/grafana/dashboards/screenshot-indexed-variables-v12.1.png" max-width="750px" alt="Panel query using variable indexing to reference a value" >}} + #### Troubleshoot multi-value variables Automatic escaping and formatting can cause problems and it can be tricky to grasp the logic behind it. Especially for InfluxDB and Prometheus where the use of regular expression syntax requires that the variable is used in regular expression operator context.