# Wanting "If" to check for empty variable

**URL:** https://www.finalbuilder.com/forums/t/wanting-if-to-check-for-empty-variable/1417
**Category:** Discussion
**Created:** [January 5, 2010, 12:14pm UTC](https://www.finalbuilder.com/forums/t/wanting-if-to-check-for-empty-variable/1417 "2010-01-05T12:14:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pkellner](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/pkellner/32/94_2.png) [@pkellner](https://www.finalbuilder.com/forums/u/pkellner)
#### Post date: [January 5, 2010, 12:14pm UTC](https://www.finalbuilder.com/forums/t/wanting-if-to-check-for-empty-variable/1417/1 "2010-01-05T12:14:11Z")

</div>

I have a variable called %SvnPathBranch% which can either be empty or have a value in it.

I&nbsp;have another variable call %SvnPath% which is set by default to "http:\\mypathtrunk"

if (%SvnPathBranch% is not&nbsp;empty)

{

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %SvnPath% = %SvnPathBranch%

}

How can I do this?

&nbsp;

---

<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: [January 5, 2010, 1:06am UTC](https://www.finalbuilder.com/forums/t/wanting-if-to-check-for-empty-variable/1417/2 "2010-01-05T01:06:40Z")

</div>

Hi Peter,   
  
 Use the If…Then action with the left hand value as %SvnPathBranch% and leave the right value blank, then use a Set Variable action as a child action.   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![pkellner](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/pkellner/32/94_2.png) [@pkellner](https://www.finalbuilder.com/forums/u/pkellner)
#### Post date: [January 5, 2010, 1:39am UTC](https://www.finalbuilder.com/forums/t/wanting-if-to-check-for-empty-variable/1417/3 "2010-01-05T01:39:17Z")

</div>

thanks.
