# Problems assigning stack pops to variables

**URL:** https://www.finalbuilder.com/forums/t/problems-assigning-stack-pops-to-variables/1108
**Category:** Discussion
**Created:** [February 11, 2009, 11:55am UTC](https://www.finalbuilder.com/forums/t/problems-assigning-stack-pops-to-variables/1108 "2009-02-11T11:55:17Z")
**Posts on this page:** 2
**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: [February 11, 2009, 11:55am UTC](https://www.finalbuilder.com/forums/t/problems-assigning-stack-pops-to-variables/1108/1 "2009-02-11T11:55:17Z")

</div>

Working on a very simple problem, but seem to be having a little problem.

Read in file and push each item onto a stack

Loop

Pop item from stack - store in temp variable POP

Define variable - PROJECT%i% (where&nbsp;i is a counter) - Set default value to %POP%

increment

end loop

&nbsp;

The problem is that POP is set correctly to the items in the stack.&nbsp; But the assignment of pop to PROJECT%i% does not work.&nbsp;

&nbsp;

Any ideas?

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [February 12, 2009, 12:15pm UTC](https://www.finalbuilder.com/forums/t/problems-assigning-stack-pops-to-variables/1108/2 "2009-02-12T12:15:33Z")

</div>

Hi Kim,   
  
 On the ‘Define Variable’ action do you have the ‘Expand variables before assigning default value’ enabled? If not then when you attempt read the PROJECT%i% value you will actually get the value of the %POP% variable.   
  
 Regards,   
 Paul.
