# Appending to variable changes %s

**URL:** <https://www.finalbuilder.com/forums/t/appending-to-variable-changes-s/2837>\
**Category:** Bugs\
**Created:** [May 24, 2007, 2:35am UTC](https://www.finalbuilder.com/forums/t/appending-to-variable-changes-s/2837 "2007-05-24T02:35:35Z")\
**Posts on this page:** 7\
**Page:** 1

<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:** [May 24, 2007, 2:35am UTC](https://www.finalbuilder.com/forums/t/appending-to-variable-changes-s/2837/1 "2007-05-24T02:35:35Z")

</div>

I need to put some percent signs into a variable, which will be html text and contain some URls. I’m building the html one table cell at a time, using the Append to Variable action. I can create a % by using %% with no problem. But the next time I append to the variable, the existing text of the variable appears to undergo variable substitution, wiping out my %'s and everything between them.   
  
This is the text with the %s before appending:

3  
And this is what it looks like afterwards:  
3  
  
  
The ‘1%7C2%7C4’ was converted to ‘17C4’. It looks like it thought that %7C2% was a variable and tried to replace it. But I don’t think appending to a variable should modify the pre-existing content. Besides, I don’t have a %7C2% variable, so it should have given an error if this is expected behavior.  
  
I know about using the %!variable% syntax to avoid this sort of thing in other situations, but the Append to Variable action has me pick the variable from a list, so I can’t insert a ‘!’.   
  
Any suggestions?  
  
Thanks,  
  
&nbsp;&nbsp;&nbsp; Keith Hearn  
&nbsp;&nbsp;&nbsp; Devicescape, Inc.

---

<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:** [May 24, 2007, 2:40am UTC](https://www.finalbuilder.com/forums/t/appending-to-variable-changes-s/2837/2 "2007-05-24T02:40:09Z")

</div>

You know, it’s fascinating the way this forum corrupts the stuff I put into it. This time it even reordered the lines. I guess that’s what I get for putting html in my message. Here is another try with all angle brackets removed. At least it seems to be leaving my percent signs alone.   
  
  
I need to put some percent signs into a variable, which will be html text and contain some URls. I’m building the html one table cell at a time, using the Append to Variable action. I can create a % by using %% with no problem. But the next time I append to the variable, the existing text of the variable appears to undergo variable substitution, wiping out my %'s and everything between them.   
  
This is the text with the %s before appending:  
  
TD bgcolor="#FFFF00" align=“center"A&nbsp;&nbsp; href=“[http://katmandu.corp.devicescape.com:5467/cov.cgi?c=AAAAAADA7g&lstate=1|2|4&q=6&runs=1311&t=6&v=1](http://katmandu.corp.devicescape.com:5467/cov.cgi?c=AAAAAADA7g&lstate=1%7C2%7C4&q=6&runs=1311&t=6&v=1)”\>3/A/TD  
  
And this is what it looks like afterwards:  
  
TD bgcolor=”#FFFF00" align="center"A href=“[http://katmandu.corp.devicescape.com:5467/cov.cgi?c=AAAAAADA7g&lstate=17C4&q=6&runs=1311&t=6&v=1](http://katmandu.corp.devicescape.com:5467/cov.cgi?c=AAAAAADA7g&lstate=17C4&q=6&runs=1311&t=6&v=1)”\>3/A/TD  
/TR  
  
The ‘1%7C2%7C4’ was converted to ‘17C4’. It looks like it thought that %7C2% was a variable and tried to replace it. But I don’t think appending to a variable should modify the pre-existing content. Besides, I don’t have a %7C2% variable, so it should have given an error if this is expected behavior.  
  
I know about using the %!variable% syntax to avoid this sort of thing in other situations, but the Append to Variable action has me pick the variable from a list, so I can’t insert a ‘!’.   
  
Any suggestions?  
  
Thanks,  
  
&nbsp;&nbsp;&nbsp; Keith Hearn  
&nbsp;&nbsp;&nbsp; Devicescape, Inc.

---

<div class="post-metadata">

**Author:** ![angus](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@angus](https://www.finalbuilder.com/forums/u/angus)\
**Post date:** [May 24, 2007, 6:37am UTC](https://www.finalbuilder.com/forums/t/appending-to-variable-changes-s/2837/3 "2007-05-24T06:37:39Z")

</div>

Hi Keith,  
  
This is a bug in the way “Append to Variable” is implemented. I’ve fixed it so that it doesn’t expand the parent variable any more (we’ll have a test build available shortly, I’ll let you know.)  
  
Regards,  
  
Angus

---

<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:** [May 24, 2007, 6:58am UTC](https://www.finalbuilder.com/forums/t/appending-to-variable-changes-s/2837/4 "2007-05-24T06:58:40Z")

</div>

Thanks, I figured you guys would get it fixed quickly. You’ve been pretty good at that in the past. 🙂  
  
 Keith

---

<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:** [June 1, 2007, 1:16am UTC](https://www.finalbuilder.com/forums/t/appending-to-variable-changes-s/2837/5 "2007-06-01T01:16:32Z")

</div>

Any update on this? I'm unable to work around. I can't just put enough %s in to escape them, because I'm doing the append in an action list that gets called several times, so I'd need a different number of %s each time though. Any word on when a new build will be available?

Thanks,

&nbsp; Keith

---

<div class="post-metadata">

**Author:** ![angus](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@angus](https://www.finalbuilder.com/forums/u/angus)\
**Post date:** [June 1, 2007, 1:27am UTC](https://www.finalbuilder.com/forums/t/appending-to-variable-changes-s/2837/6 "2007-06-01T01:27:42Z")

</div>

Hi Keith,   
  
 Sorry, I forgot to let you know that the test build was out. The fix should be in this download:   
  
 [https://www.finalbuilder.com/downloads/finalbuilder/550/FB550\_251.exe](https://www.finalbuilder.com/downloads/finalbuilder/550/FB550_251.exe)   
  
 - Angus

---

<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:** [June 1, 2007, 1:31am UTC](https://www.finalbuilder.com/forums/t/appending-to-variable-changes-s/2837/7 "2007-06-01T01:31:58Z")

</div>

Ok, I'll give it a try.

Thanks,

&nbsp; Keith
