# Why does var replacement not work in snippet?

**URL:** <https://community.dynatrace.com/t/why-does-var-replacement-not-work-in-snippet/45687>\
**Category:** Developer Q&A Forum\
**Tags:** platform-services, ad-hoc-functions\
**Created:** [May 20, 2024, 6:28pm UTC](https://community.dynatrace.com/t/why-does-var-replacement-not-work-in-snippet/45687 "2024-05-20T18:28:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [May 20, 2024, 6:28pm UTC](https://community.dynatrace.com/t/why-does-var-replacement-not-work-in-snippet/45687/1 "2024-05-20T18:28:09Z")

</div>

Hello.

I have defined two vars:

 ![henk_stobbe_0-1716229397070.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/3/83f6c28ff9a94aad96e8ac20e17a586d5eae4863.png)

and

 ![henk_stobbe_1-1716229433126.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/0/a082b45d3c833cbabb398a67db90ab4bdfed00a1.png)

Using this snippet:

export default async function ()  
{  
return $Varx  
}

Why does var2 (text) work?

 ![henk_stobbe_2-1716229576359.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/beb3d6fce2ee7648a840e2d2924c8f03fcbfae6c.png)

But var2 (CSV) not?

 ![henk_stobbe_3-1716229638442.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/c/ecad83c867e1fc56c51d8e5b59e0a75557d6227a.png)

KR Henk

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [May 21, 2024, 6:33am UTC](https://community.dynatrace.com/t/why-does-var-replacement-not-work-in-snippet/45687/2 "2024-05-21T06:33:27Z")

</div>

Simple solution,

Delete filter and start over (-:

 ![henk_stobbe_0-1716273162837.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/5/15222228d5a925bb98e7c90ae4279a268466d50c.png)

If the default value does not appear, you have the same issue!

KR Henk
