---
title: "How to set plan variables on queueBuild"
canonical: "https://support.appfire.com/space/SUPPORT/89135170/How%20to%20set%20plan%20variables%20on%20queueBuild"
format: markdown
---
# Description

[queueBuild](https://appfire.atlassian.net/wiki/display/BCLI/Documentation#Documentation-queueBuild) has the ability to set plan variables for the build. This makes it easy to script the running of builds that have different inputs for testing or other purposes. Moreover, using the [wait](https://appfire.atlassian.net/wiki/display/BCLI/Documentation#Documentation-wait) parameter allows you to serialize the running of the plan with different parameters. The parameters that are important for this are:

1. The [fields](https://appfire.atlassian.net/wiki/display/BCLI/Documentation#Documentation-fields) parameter can be used to set an arbitrary number of Bamboo build parameters in **field:value** pairs, but is more difficult to use than the next approach.
2. Up to 8 Bamboo build parameters can be set. This is done using the [field1](https://appfire.atlassian.net/wiki/display/BCLI/Documentation#Documentation-field1) / [value1](https://appfire.atlassian.net/wiki/display/BCLI/Documentation#Documentation-value1) combined parameters or their equivalent field2/value2, field3/value3, field4/value4 parameters. It is easier to set variables this way without worrying about list separators and quoting that may be necessary with the more general **fields** parameter.

# Example - Simple

##### **Set a single plan parameter**

```
bamboo --action queueBuild --build "DEMO-example" --wait --field1 "exitCode" --value1 "0"

or

bamboo --action queueBuild --build "DEMO-example" --wait --fields "exitCode: 0"  
 
or (CLI 8.0 or higher)

bamboo --action queueBuild --build "DEMO-example" --wait --field "exitCode=0"  
```

# Example - runFromList

This shows running the same build with a number of different parameters. These are serialized (because of the **--wait** parameter).

##### **runFromList**

```
bamboo --action runFromList --list "exitCode:0,exitCode:1" --common "--action queueBuild --build DEMO-example --wait --timeout 90 --fields @entry@" 
```