# Set Variable OnExpand Event

**URL:** <https://www.finalbuilder.com/forums/t/set-variable-onexpand-event/4374>\
**Category:** Discussion\
**Created:** [May 21, 2009, 9:54am UTC](https://www.finalbuilder.com/forums/t/set-variable-onexpand-event/4374 "2009-05-21T09:54:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sexy-trousers](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sexy-trousers/32/97_2.png) [@sexy-trousers](https://www.finalbuilder.com/forums/u/sexy-trousers)\
**Post date:** [May 21, 2009, 9:54am UTC](https://www.finalbuilder.com/forums/t/set-variable-onexpand-event/4374/1 "2009-05-21T09:54:34Z")

</div>

Wouldn't it be nice if there were such a thing as an OnExpand event on the set variable action...

i.e. you're building up a SQL UPDATE statement with a bunch of Automise variables in a Set Variable action and for each variable you would like to run a function against the variable to escape any disallowed characters like the apostrophe / single quote (') so values like "my favorite's" can be escaped to "my favorite''s" - now that would be very nice indeed. As it is I have to either build it up in a VBScript using a Global Script or create dozens of Replace Actions...

If anyone can think of another way of doing this with the current version (3.0.0.629), I'd appreciate hearing from you

TJ

---

<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 30, 2009, 5:12am UTC](https://www.finalbuilder.com/forums/t/set-variable-onexpand-event/4374/2 "2009-05-30T05:12:10Z")

</div>

Have you tried using Text Find/Replace?

&nbsp;

Have it find ' and change it to ''

&nbsp;
