# Take action for all 50 states

**URL:** https://www.finalbuilder.com/forums/t/take-action-for-all-50-states/2313
**Category:** Discussion
**Created:** [October 6, 2014, 8:12am UTC](https://www.finalbuilder.com/forums/t/take-action-for-all-50-states/2313 "2014-10-06T08:12:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nickhodges](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/nickhodges/32/122_2.png) [@nickhodges](https://www.finalbuilder.com/forums/u/nickhodges)
#### Post date: [October 6, 2014, 8:12am UTC](https://www.finalbuilder.com/forums/t/take-action-for-all-50-states/2313/1 "2014-10-06T08:12:17Z")

</div>

I would like to run an EXE, passing each of the two-letter abbreviations of the fifty states to an executable. &nbsp;  
  
In other words, I want to run an executable 50 times, once for each state, passing that state as a command line parameter.  
  
I can put the fifty states into any form that is needed.  
  
How might I go about doing this? &nbsp;Obviously, I’d prefer to use a _ **for** _ loop, but I’ll do whatever I need to…&nbsp;Veeva Systems

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [October 6, 2014, 11:46am UTC](https://www.finalbuilder.com/forums/t/take-action-for-all-50-states/2313/2 "2014-10-06T11:46:05Z")

</div>

Hi Nick,&nbsp;  
  
I have put together an example of how I would approach this.&nbsp;  
  
It uses a List Iterator action (a higher level for loop over a list), which places its current loop value into the variable selected in its dialog. Then as a child action of this I use a Execute Program action. This then executes the program I am using (in my case cmd.exe) passing the command line options required plus the value of the loop variable.&nbsp;  
  
Let me know how that goes.&nbsp;[\_\_31705\_\_0\_\_StatesListInterator.fbp7](https://www.finalbuilder.com/forums/uploads/default/original/2X/4/45ec314d2fc95d3a3c3e0508a01817a51d4e3370.fbp7) (22.016 KB)

---

<div class="post-metadata">

### Author: ![nickhodges](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/nickhodges/32/122_2.png) [@nickhodges](https://www.finalbuilder.com/forums/u/nickhodges)
#### Post date: [October 7, 2014, 3:30am UTC](https://www.finalbuilder.com/forums/t/take-action-for-all-50-states/2313/3 "2014-10-07T03:30:36Z")

</div>

Jason –   
  
 Perfect – thanks so much.
