# How to specify multiple values for an external parameter in a file?

**URL:** <https://forum.opentap.io/t/how-to-specify-multiple-values-for-an-external-parameter-in-a-file/351>\
**Category:** Technical\
**Tags:** opentap-sdk\
**Created:** [June 22, 2021, 5:59pm UTC](https://forum.opentap.io/t/how-to-specify-multiple-values-for-an-external-parameter-in-a-file/351 "2021-06-22T17:59:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushik.santhanam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/kaushik.santhanam/32/208_2.png) [@kaushik.santhanam](https://forum.opentap.io/u/kaushik.santhanam)\
**Post date:** [June 22, 2021, 5:59pm UTC](https://forum.opentap.io/t/how-to-specify-multiple-values-for-an-external-parameter-in-a-file/351/1 "2021-06-22T17:59:31Z")

</div>

You can specify multiple values for an external parameter that is a list.

Just add multiple rows to the csv file like below. (In this case we have a test plan which sweeps the frequency.

```csharp
Enabled, Parameters \ Frequency
TRUE, 1000
TRUE, 2000
FALSE, 4000
TRUE, 5000

```

---

<div class="post-metadata">

**Author:** ![GoranJohnsson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/goranjohnsson/32/140_2.png) [@GoranJohnsson](https://forum.opentap.io/u/GoranJohnsson)\
**Post date:** [June 22, 2021, 6:40pm UTC](https://forum.opentap.io/t/how-to-specify-multiple-values-for-an-external-parameter-in-a-file/351/2 "2021-06-22T18:40:00Z")

</div>

Interesting. Is there an example available (or planned)?

---

<div class="post-metadata">

**Author:** ![jouni.uusimaa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/jouni.uusimaa/32/333_2.png) [@jouni.uusimaa](https://forum.opentap.io/u/jouni.uusimaa)\
**Post date:** [June 23, 2021, 5:54am UTC](https://forum.opentap.io/t/how-to-specify-multiple-values-for-an-external-parameter-in-a-file/351/3 "2021-06-23T05:54:17Z")

</div>

I am unable get this working with my tap plan (which I cannot attach here because I’m a new user). But listing external parameters with tap.exe gives this

```csharp
OpenTAP Command Line Interface 9.14.0+51e7081e

Loaded test plan from C:\Tap plans\SweepExample.TapPlan [512 ms]
Test Plan: SweepExample
Listing 2 External Test Plan Parameters:
  Parameters \ Sweep 1 \ APTSweep Values = Count: 3
  Parameters \ Sweep 2 \ APTSweep Values = Count: 3

```

CSV file containing external parameters:

```csharp
Parameters \ Sweep 1 \ APTSweep Values
1
1
1
Parameters \ Sweep 2 \ APTSweep Values
Log 11
Log 22
Log 33

```

When I run the tap plan, original values are used instead of ones found in CSV file. Could you what I’m doing wrong here? I am using OpenTAP Command Line Interface 9.14.0+51e7081e.

---

<div class="post-metadata">

**Author:** ![brennen\_direnzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/brennen_direnzo/32/6_2.png) [@brennen\_direnzo](https://forum.opentap.io/u/brennen_direnzo)\
**Post date:** [June 23, 2021, 3:48pm UTC](https://forum.opentap.io/t/how-to-specify-multiple-values-for-an-external-parameter-in-a-file/351/4 "2021-06-23T15:48:10Z")

</div>

@jouni.uusimaa here is an example you can try. The command to run from the command line is:

`tap run ExternalSweep.TapPlan -e ExternalSweepValues.csv`

This uses the Demo Plugin. I’ve also upgraded your test level, so you should be able to add attachments in future posts.  
[ExternalSweep.TapPlan](https://forum.opentap.io/uploads/short-url/eSLeifBapjL3AjvjZPLs1K6losT.TapPlan) (4.7 KB)  
[ExternalSweepValues.csv](https://forum.opentap.io/uploads/short-url/rrnbm4gvtgUFW70Ma6RSja2roxy.csv) (50 Bytes)

---

<div class="post-metadata">

**Author:** ![jouni.uusimaa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/jouni.uusimaa/32/333_2.png) [@jouni.uusimaa](https://forum.opentap.io/u/jouni.uusimaa)\
**Post date:** [June 28, 2021, 6:43am UTC](https://forum.opentap.io/t/how-to-specify-multiple-values-for-an-external-parameter-in-a-file/351/5 "2021-06-28T06:43:08Z")

</div>

@brennen_direnzo I tested with the files you provided and manually changed values in CSV file but according to output.txt it seems that original values are still being used.

[ExternalSweepValues.csv](https://forum.opentap.io/uploads/short-url/vQe7Xkb3vdt22Qt0zuQCQ6Tbgyq.csv) (49 Bytes)  
[output.txt](https://forum.opentap.io/uploads/short-url/1G5IOzIOPSCT113Mkkq8vKvULF3.txt) (10.6 KB)

---

<div class="post-metadata">

**Author:** ![brennen\_direnzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/brennen_direnzo/32/6_2.png) [@brennen\_direnzo](https://forum.opentap.io/u/brennen_direnzo)\
**Post date:** [June 28, 2021, 5:53pm UTC](https://forum.opentap.io/t/how-to-specify-multiple-values-for-an-external-parameter-in-a-file/351/6 "2021-06-28T17:53:26Z")

</div>

@jouni.uusimaa I’m actually seeing the same behavior (I guess I was fooled by using the same values). I’m seeing some other odd behavior and have submitted this issue:

> **[Unable to Export Sweep Values through External Parameter file (#699) · Issues...](https://gitlab.com/OpenTAP/opentap/-/issues/699)**
>
> Possibly related to #696....

I’ll let you know once we have a solution.
