# Write to Text File expands embedded variables

**URL:** https://www.finalbuilder.com/forums/t/write-to-text-file-expands-embedded-variables/1470
**Category:** Discussion
**Created:** [April 29, 2010, 1:18am UTC](https://www.finalbuilder.com/forums/t/write-to-text-file-expands-embedded-variables/1470 "2010-04-29T01:18:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![heath1](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/h/ccd318/32.png) [@heath1](https://www.finalbuilder.com/forums/u/heath1)
#### Post date: [April 29, 2010, 1:18am UTC](https://www.finalbuilder.com/forums/t/write-to-text-file-expands-embedded-variables/1470/1 "2010-04-29T01:18:45Z")

</div>

Hi,

We're using TFS&nbsp;Query Work Items and Write to Text File actions to create a HTML&nbsp;report.

The HTML&nbsp;output from the Query Work Items action is written to our BUILD\_TFS\_QUERY\_RESULTS variable. If a TFS work item title contains&nbsp;a percentage character, i.e. "%\*error%", then Write&nbsp;to&nbsp;Text File&nbsp;expands not only BUILD\_TFS\_QUERY\_RESULTS, but&nbsp;what it believes are&nbsp;FB variables in the variable from our&nbsp;query.

I have considered changing my SELECT query to replace "%" with "" but that's not ideal nor is asking our testers/developers not to use the % character.

Is there a way to prevent&nbsp;Write to Text File&nbsp;recursively expanding variables?

Many thanks,

Heath.

&nbsp;

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 29, 2010, 1:41am UTC](https://www.finalbuilder.com/forums/t/write-to-text-file-expands-embedded-variables/1470/2 "2010-04-29T01:41:14Z")

</div>

Hi Heath   
  
 This article should help : [https://www.finalbuilder.com/articles.aspx?mid=370&ctl=ArticleView&articleId=10](https://www.finalbuilder.com/articles.aspx?mid=370&ctl=ArticleView&articleId=10)   
  
 This info is also in the help file

---

<div class="post-metadata">

### Author: ![heath1](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/h/ccd318/32.png) [@heath1](https://www.finalbuilder.com/forums/u/heath1)
#### Post date: [April 29, 2010, 4:08am UTC](https://www.finalbuilder.com/forums/t/write-to-text-file-expands-embedded-variables/1470/3 "2010-04-29T04:08:20Z")

</div>

Hi Vincent,

That worked perfectly.&nbsp;

Thanks,

Heath.

&nbsp;

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [December 9, 2011, 9:10am UTC](https://www.finalbuilder.com/forums/t/write-to-text-file-expands-embedded-variables/1470/4 "2011-12-09T09:10:59Z")

</div>

The link to the solution doesn’t work anymore.   
 Can someone explain how to solve this problem?   
  
 thanks,   
 Tobi

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [December 9, 2011, 9:51am UTC](https://www.finalbuilder.com/forums/t/write-to-text-file-expands-embedded-variables/1470/5 "2011-12-09T09:51:07Z")

</div>

Hmmm… not sure why that doesn’t work, but this should : [https://www.finalbuilder.com/articles.aspx?ID=10](https://www.finalbuilder.com/articles.aspx?ID=10)
