# ActionGroup - Local Variable - Default Value expression not evaluated when the actions group is executed

**URL:** https://www.finalbuilder.com/forums/t/actiongroup-local-variable-default-value-expression-not-evaluated-when-the-actions-group-is-executed/3572
**Category:** Bugs
**Created:** [August 21, 2015, 5:32am UTC](https://www.finalbuilder.com/forums/t/actiongroup-local-variable-default-value-expression-not-evaluated-when-the-actions-group-is-executed/3572 "2015-08-21T05:32:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sln\_widex](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@sln\_widex](https://www.finalbuilder.com/forums/u/sln_widex)
#### Post date: [August 21, 2015, 5:32am UTC](https://www.finalbuilder.com/forums/t/actiongroup-local-variable-default-value-expression-not-evaluated-when-the-actions-group-is-executed/3572/1 "2015-08-21T05:32:33Z")

</div>

Our FB scripts fails after upgrading to FB 8.  
Problem:&nbsp;  
The Default Value for a Local Variable in an Action Group is not (re)evaluated when the Action Group is executed.  
For example, if the Default Value expression contains another variable then this variable expands to the startup value and not the value is has when the Action Group is executed.&nbsp;  
  
See example below (attachment refused by the site)  
  
Migrated scripts from FB7.0 &nbsp;Build 3202 &nbsp;to FB8.0 Build 941  
Win 7 SP1 Latest updates.  
  
/Svend  
  
project  
begin  
&nbsp; projectid = {07AF6583-50E1-45E5-86A2-9157E9A1144C}  
&nbsp; target  
&nbsp; begin  
&nbsp; &nbsp; name = Default  
&nbsp; &nbsp; targetid = {9EB83160-EAFF-4721-A7E8-A5DB2A781C9A}  
&nbsp; &nbsp; rootaction  
&nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; action.variable.set  
&nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; applytoexisting = false  
&nbsp; &nbsp; &nbsp; &nbsp; doexpandexpression = true  
&nbsp; &nbsp; &nbsp; &nbsp; forcetype = ftString  
&nbsp; &nbsp; &nbsp; &nbsp; id = {F4BDB720-42B4-42D8-828C-BB2BC029FFE7}  
&nbsp; &nbsp; &nbsp; &nbsp; modifier = smNone  
&nbsp; &nbsp; &nbsp; &nbsp; newvalue = Hallo  
&nbsp; &nbsp; &nbsp; &nbsp; variablename = Var1  
&nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; &nbsp; action.group  
&nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; id = {EE474A34-757B-41E3-9C0A-8218B5952218}  
&nbsp; &nbsp; &nbsp; &nbsp; variable  
&nbsp; &nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; defaultvalue = %Var1%\Friends  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name = Var2  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; variablescope = vtLocal  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; variabletype = btString  
&nbsp; &nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; &nbsp; &nbsp; variable  
&nbsp; &nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; defaultvalue = First  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name = Var3  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; variablescope = vtLocal  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; variabletype = btString  
&nbsp; &nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; &nbsp; &nbsp; action.variables.logvalues  
&nbsp; &nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; failifnotdefined = true  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = {3DF7D4CF-A989-421D-AA2B-71D9EAC22921}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; logallvariables = false  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; variablestoragestring = “Var2” +  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “Var1” +  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “”  
&nbsp; &nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; &nbsp; &nbsp; action.gui.messagebox  
&nbsp; &nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; actiontypeid = {3D6458F4-1522-48B6-8446-D2DEE0A36D55}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; customactionname = MessageBox  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enabletimeout = false  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = {55A63500-6467-4585-955A-05760853E631}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; impersonateusenetcredonly = false  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; impersonateuser = false  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; terminateontimeout = true  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timeoutlength = 2  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.caption = Test  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.text = “Expected Output: %Var1%\Friends” +  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “Actual Output: %Var2%”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.buttons = 0  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.icon = 0  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.defaultbutton = 0  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.systemmodal = 0  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.returnvalue = 1  
&nbsp; &nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; &nbsp; &nbsp; action.variable.set  
&nbsp; &nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; applytoexisting = false  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; doexpandexpression = true  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; forcetype = ftString  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = {C55F5490-2DFF-4B95-848F-A5627F769E79}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; modifier = smNone  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newvalue = Local  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; variablename = Var3  
&nbsp; &nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; &nbsp; &nbsp; action.group  
&nbsp; &nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = {D6A34633-DD23-4DD7-B83D-A45E1A7E2A83}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; variable  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; defaultvalue = %Var3%\Value  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name = Var4  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; variablescope = vtLocal  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; variabletype = btString  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action.variables.logvalues  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; failifnotdefined = true  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = {E2812760-9C92-4660-9727-DDE66011F6D4}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; logallvariables = false  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; variablestoragestring = “Var4” +  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “Var3” +  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; action.gui.messagebox  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; actiontypeid = {3D6458F4-1522-48B6-8446-D2DEE0A36D55}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; customactionname = MessageBox  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enabletimeout = false  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id = {A017C280-F372-4376-9375-1EB05854C852}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; impersonateusenetcredonly = false  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; impersonateuser = false  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; terminateontimeout = true  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timeoutlength = 2  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.caption = Test  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.text = “Expected Output: %Var3%\Value” +  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; “Actual Output: %Var4%”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.buttons = 0  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.icon = 0  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.defaultbutton = 0  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.systemmodal = 0  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; as.returnvalue = 1  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; &nbsp; end  
&nbsp; &nbsp; end  
&nbsp; end  
&nbsp; variable  
&nbsp; begin  
&nbsp; &nbsp; defaultvalue = InitialValue  
&nbsp; &nbsp; name = Var1  
&nbsp; &nbsp; variablescope = vtProject  
&nbsp; &nbsp; variabletype = btString  
&nbsp; end  
end

---

<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: [August 22, 2015, 9:41am UTC](https://www.finalbuilder.com/forums/t/actiongroup-local-variable-default-value-expression-not-evaluated-when-the-actions-group-is-executed/3572/2 "2015-08-22T09:41:28Z")

</div>

Thanks, this one was already reported and we’re currently testing a fix, should have an update out on monday.

---

<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: [August 24, 2015, 9:48am UTC](https://www.finalbuilder.com/forums/t/actiongroup-local-variable-default-value-expression-not-evaluated-when-the-actions-group-is-executed/3572/3 "2015-08-24T09:48:55Z")

</div>

This is fixed in 8.0.0.950 which is now available for download.
