# Configure Multi-Select Dashboard Variables That Populate Other Fields

**URL:** <https://community.dynatrace.com/t/configure-multi-select-dashboard-variables-that-populate-other-fields/52838>\
**Category:** DQL\
**Tags:** dql, variables, dashboards\
**Created:** [August 6, 2025, 6:43pm UTC](https://community.dynatrace.com/t/configure-multi-select-dashboard-variables-that-populate-other-fields/52838 "2025-08-06T18:43:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edjumacator](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Edjumacator](https://community.dynatrace.com/u/Edjumacator)\
**Post date:** [August 6, 2025, 6:43pm UTC](https://community.dynatrace.com/t/configure-multi-select-dashboard-variables-that-populate-other-fields/52838/1 "2025-08-06T18:43:43Z")

</div>

I have two multi-select variables, “Scope” which contains values used in dt.entity.host names and then “Hosts” which I would like to filter based on selected “Scope” values.

Scope:

 ![Screenshot 2025-08-06 at 12.29.02 PM.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/7/a7a33b60ae458d3ac754de11abd379e75dd69e8f.png)

Hosts:

 ![Edjumacator_0-1754504931217.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/2/52ff5fb57027f8d85580bfaac37dd2aa104b09c4.png)

My goal would be to gather all hosts that contain the selected “Scope” values.

```auto
fetch dt.entity.host
// I've tried a combination of the following:
| filter matchesValue(entity.name, Array($Scope))

| filter in(entity.name, Array($Scope))

```

Maybe I’m missing something. Any help would be greatly appreciated. Thanks in advance for any consideration!

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [August 7, 2025, 2:21am UTC](https://community.dynatrace.com/t/configure-multi-select-dashboard-variables-that-populate-other-fields/52838/2 "2025-08-07T02:21:39Z")

</div>

[@Edjumacator](https://community.dynatrace.com/user/91936)&nbsp;Can you please try below for hosts as an example and see if it helps?

```markup
fetch dt.entity.host
| filter matchesPhrase(entity.name,$Scope)
| fields entity.name

```

---

<div class="post-metadata">

**Author:** ![Edjumacator](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Edjumacator](https://community.dynatrace.com/u/Edjumacator)\
**Post date:** [August 11, 2025, 4:55pm UTC](https://community.dynatrace.com/t/configure-multi-select-dashboard-variables-that-populate-other-fields/52838/3 "2025-08-11T16:55:37Z")

</div>

[@p\_devulapalli](https://community.dynatrace.com/user/21657)&nbsp;It works for a single selection of my scope, however, if I select multiple choices in scope, it doesn’t seem to work. Is there a way to pass an array of values to be matched against?

Scope:  
✅AWS&nbsp;  
☑WEB  
✅APP

Hosts (Populates with)  
AWS-CA…  
AWS-WV…  
CAPP-1  
CAPP-2

---

<div class="post-metadata">

**Author:** ![siavash1996](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/siavash1996/32/19300_2.png) [@siavash1996](https://community.dynatrace.com/u/siavash1996)\
**Post date:** [August 12, 2025, 5:38am UTC](https://community.dynatrace.com/t/configure-multi-select-dashboard-variables-that-populate-other-fields/52838/4 "2025-08-12T05:38:39Z")

</div>

I’ve gotten it to work doing something like this:

```auto
| filter matchesValue(entity.name, {$Scope})

```

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [August 12, 2025, 5:44am UTC](https://community.dynatrace.com/t/configure-multi-select-dashboard-variables-that-populate-other-fields/52838/5 "2025-08-12T05:44:57Z")

</div>

[@Edjumacator](https://community.dynatrace.com/user/91936)&nbsp;Can you please try below and see if it helps

```markup
fetch dt.entity.host
| filter in(entity.name, {$Scope})
| fields entity.name

```

---

<div class="post-metadata">

**Author:** ![Edjumacator](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Edjumacator](https://community.dynatrace.com/u/Edjumacator)\
**Post date:** [August 12, 2025, 2:29pm UTC](https://community.dynatrace.com/t/configure-multi-select-dashboard-variables-that-populate-other-fields/52838/6 "2025-08-12T14:29:31Z")

</div>

[@siavash1996](https://community.dynatrace.com/user/71316)&nbsp;I have given that a shot but nothing appears to be working.

 ![Edjumacator_2-1755008869793.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/6/86123d82993baed662d50d08aabdc1d88c27757e.png)

If I select WEB, and run the query below:

// Example of what works:  
fetch dt.entity.host  
| fields host = entity.name  
| filter matchesValue(“\*”, {$Scope})  
or (matchesValue(“AWS”, {$Scope}) and contains(host, “AWS”))  
or (matchesValue(“WEB”, {$Scope}) and contains(host, “WEB”))  
or (matchesValue(“APP”, {$Scope}) and contains(host, “APP”))  
| sort host  
| fields host

That returns

 ![Edjumacator_1-1755008827868.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/c/8c1bc341b9f2732c3550e11a05c3d0efee994ba0.png)

// Example of what I’m shooting for:  
fetch dt.entity.host  
| fields host = entity.name  
| filter matchesValue(“\*”, {$Scope})  
or matchesPhrase(host, {$Scope}, caseSensitive:false)  
| sort host  
| fields host

I am hoping to be able to write a matchesValue, matchesPhrase, in, or contains that doesnt require me to manually update this variable everytime I add something to the scope.

or (matchesValue(“AWS”, {$Scope}) and contains(host, “AWS”))

---

<div class="post-metadata">

**Author:** ![izabelarokita](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/izabelarokita/32/41812_2.png) [@izabelarokita](https://community.dynatrace.com/u/izabelarokita)\
**Post date:** [December 17, 2025, 1:40pm UTC](https://community.dynatrace.com/t/configure-multi-select-dashboard-variables-that-populate-other-fields/52838/7 "2025-12-17T13:40:55Z")

</div>

Hey&nbsp;[@Edjumacator](https://community.dynatrace.com/user/91936)&nbsp;,  
I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you!&nbsp;:blush:  
Please let me know what works best for you.
