# Adding conditionals in Build Delphi Action

**URL:** https://www.finalbuilder.com/forums/t/adding-conditionals-in-build-delphi-action/2487
**Category:** Discussion
**Created:** [July 8, 2016, 11:33am UTC](https://www.finalbuilder.com/forums/t/adding-conditionals-in-build-delphi-action/2487 "2016-07-08T11:33:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![chillefeld](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/chillefeld/32/1333_2.png) [@chillefeld](https://www.finalbuilder.com/forums/u/chillefeld)
#### Post date: [July 8, 2016, 11:33am UTC](https://www.finalbuilder.com/forums/t/adding-conditionals-in-build-delphi-action/2487/1 "2016-07-08T11:33:43Z")

</div>

Hi,  
  
I have a number of Build Delphi Actions in our build script and all of them have the option to “Use conditionals from project settings file” set.  
This has been the correct behavior so far but now I would like to add some conditionals to those from the project file.  
  
So if the project file sets conditionals FOO and BAR I would like to add BAZ so the poject is built with FOO;BAR;BAZ set.  
Is there an easy way to this?  
  
Regards,  
Christoph

---

<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: [July 12, 2016, 1:06am UTC](https://www.finalbuilder.com/forums/t/adding-conditionals-in-build-delphi-action/2487/2 "2016-07-12T01:06:25Z")

</div>

I believe you can use the OnBeforeCompile script event. This will have all the conditionals loaded into the action. You can also then change the conditionals value as you see fit and it will be used for the compile.   
  
 if (Action.Conditionals === “FOO;BAR” | Action.Conditionals === “BAR;FOO”)   
 Action.Conditionals = Action.Conditionals + “;BAZ”   
  
 The above should be close to what you are looking to use in the script event of the action.
