# Magic behaviour of Define Variable Action

**URL:** https://www.finalbuilder.com/forums/t/magic-behaviour-of-define-variable-action/3387
**Category:** Bugs
**Created:** [August 17, 2011, 3:01am UTC](https://www.finalbuilder.com/forums/t/magic-behaviour-of-define-variable-action/3387 "2011-08-17T03:01:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![finalbuilder](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/f/d07c76/32.png) [@finalbuilder](https://www.finalbuilder.com/forums/u/finalbuilder)
#### Post date: [August 17, 2011, 3:01am UTC](https://www.finalbuilder.com/forums/t/magic-behaviour-of-define-variable-action/3387/1 "2011-08-17T03:01:41Z")

</div>

Hi Support Team,

please find attached a sample project which should reveal&nbsp;a magic behaviour I&nbsp;discovered while programming.I'm not quite sure whether it is a bug or a feature...

As you see I&nbsp;have two variables (A &&nbsp;B)&nbsp;in the main project. In an action list I&nbsp;'re-declare' these variables for the case I include this project from another project and want to execute the 'Extra' Action List and A and /&nbsp;or B&nbsp;is not defined.

'A' works as expected:&nbsp;it is initialized once (i.e. if the variable is already set, it keeps its content)

'B' does not work as expected:&nbsp;it is initialized each time the action list is called.

The background is:&nbsp;I&nbsp;want to calculate&nbsp;the content only once;&nbsp;the value should be saved between different action list calls.

Is this a bug or do use this in a wrong manner?

Best regards

Michael

[20110817\_Declare\_Variable.fbp7](https://www.finalbuilder.com/forums/uploads/default/original/2X/d/dc400612b275a9de7e4b8d66edd3c671baa77928.fbp7) (95 KB)
