# Make "prompt for variables" required

**URL:** https://www.finalbuilder.com/forums/t/make-prompt-for-variables-required/355
**Category:** Discussion
**Created:** [February 13, 2007, 10:13am UTC](https://www.finalbuilder.com/forums/t/make-prompt-for-variables-required/355 "2007-02-13T10:13:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jhunsaker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/b3f665/32.png) [@jhunsaker](https://www.finalbuilder.com/forums/u/jhunsaker)
#### Post date: [February 13, 2007, 10:13am UTC](https://www.finalbuilder.com/forums/t/make-prompt-for-variables-required/355/1 "2007-02-13T10:13:33Z")

</div>

Is there a way to make a variable within “Prompt for Variables (Enhanced)” required? For example, I need to ensure the user has indeed choosen an item from a checklist control. Would I do this using scripting?   
  
Thanks.

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [February 14, 2007, 1:09am UTC](https://www.finalbuilder.com/forums/t/make-prompt-for-variables-required/355/2 "2007-02-14T01:09:23Z")

</div>

Jeff,  
  
Yes, you can write some script to do this. First in the BeforeAction event make sure you set your variable to a known value:  
  
MyChoiceVariable = ""  
  
Then in the AfterAction do something like this:  
  
if MyChoiceVariable = “” then  
 Action.SendLogMessage “Failing action because user didn’t choose an option”  
 ActionResult = False  
end if  
  
hth.

---

<div class="post-metadata">

### Author: ![stevage](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@stevage](https://www.finalbuilder.com/forums/u/stevage)
#### Post date: [February 14, 2007, 1:41am UTC](https://www.finalbuilder.com/forums/t/make-prompt-for-variables-required/355/3 "2007-02-14T01:41:57Z")

</div>

Or, use a While Loop:  
  
Set variable MyChoiceVariable = ""  
While Loop (MyChoiceVariable = “”)  
-Prompt for Variables (enhanced)  
  
You could get more fancy, but that’s the basic idea.  
  
Steve

---

<div class="post-metadata">

### Author: ![jhunsaker](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/j/b3f665/32.png) [@jhunsaker](https://www.finalbuilder.com/forums/u/jhunsaker)
#### Post date: [February 14, 2007, 2:13am UTC](https://www.finalbuilder.com/forums/t/make-prompt-for-variables-required/355/4 "2007-02-14T02:13:26Z")

</div>

Slick solution. I implemented the ‘while’ option. Exactly what I needed.   
  
Thanks.
