# Possible to set values in non-textbox controls with variables?

**URL:** https://www.finalbuilder.com/forums/t/possible-to-set-values-in-non-textbox-controls-with-variables/1033
**Category:** Discussion
**Created:** [November 12, 2008, 7:32am UTC](https://www.finalbuilder.com/forums/t/possible-to-set-values-in-non-textbox-controls-with-variables/1033 "2008-11-12T07:32:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![nelsonwolf](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/b9e5f3/32.png) [@nelsonwolf](https://www.finalbuilder.com/forums/u/nelsonwolf)
#### Post date: [November 12, 2008, 7:32am UTC](https://www.finalbuilder.com/forums/t/possible-to-set-values-in-non-textbox-controls-with-variables/1033/1 "2008-11-12T07:32:12Z")

</div>

Hi,

Is it possible to set the value in a&nbsp;dropdown, listbox, radiobutton or checkbox with a FB variable?&nbsp; For example, let's say I have a variable the specifies whether or not to "Use MSBuild" with the Build VS.Net Solution Action.&nbsp; In this scenario I have been creating if statements and duplicating the action, one with it checked, one without.&nbsp; I was wondering if there was an way to script this in BeforeAction so only 1 action is required in the script.&nbsp; Is this possible?

Thanks!

-Nelson Wolf

---

<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: [November 12, 2008, 10:12am UTC](https://www.finalbuilder.com/forums/t/possible-to-set-values-in-non-textbox-controls-with-variables/1033/2 "2008-11-12T10:12:47Z")

</div>

Hi Nelson   
  
 The Prompt for Variables (Enahnced) Action will do this.

---

<div class="post-metadata">

### Author: ![nelsonwolf](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/b9e5f3/32.png) [@nelsonwolf](https://www.finalbuilder.com/forums/u/nelsonwolf)
#### Post date: [November 12, 2008, 11:12am UTC](https://www.finalbuilder.com/forums/t/possible-to-set-values-in-non-textbox-controls-with-variables/1033/3 "2008-11-12T11:12:15Z")

</div>

Hi Vincent,

I'm not looking for a way to prompt th user.&nbsp; What I want to do is have a variable like %UseMSBuild% set to either 1 or 0 which will result in the Use MSBuild checkbox in the&nbsp;"Build VS.Net Solution" action to be checked or unchecked at runtime depending on the variable. I know I can have an IF and Else Action and two Build Solution actions to accomplish this, but I was curious if there is a way to accomplish this with 1 build solution action and script in BeforeAction.&nbsp; I'm just using this as an example.&nbsp; I was wondering if there is a way to set&nbsp;drop downs, listboxes, checkboxes etc in Actions that don't permit variables to be entered in the configuration tabs of those actions.&nbsp; Hope that makes more sense.

Thanks,

Nelson

---

<div class="post-metadata">

### Author: ![nelsonwolf](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/b9e5f3/32.png) [@nelsonwolf](https://www.finalbuilder.com/forums/u/nelsonwolf)
#### Post date: [November 12, 2008, 11:36am UTC](https://www.finalbuilder.com/forums/t/possible-to-set-values-in-non-textbox-controls-with-variables/1033/4 "2008-11-12T11:36:13Z")

</div>

I think I found what I’m looking for. In the case of the Build [VS.Net](http://VS.Net) Solution and Use MSBuild, I think I want to issue Action.UseMSBuild(UseMsbuildVar) in BeforeAction. Only that doesn’t seem to change what is already set in the dialog. Am I getting closer?

---

<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: [November 13, 2008, 1:09am UTC](https://www.finalbuilder.com/forums/t/possible-to-set-values-in-non-textbox-controls-with-variables/1033/5 "2008-11-13T01:09:47Z")

</div>

Ah sorry, I misunderstood your question. What you need is this (VBScript) :

Action.UseMSBuild = FBVariables.UseMSBUILD

&nbsp;

It's a boolean property, so set the variable to true or false as needed.

HTH

&nbsp;
