# values in a feeder is always the same despite a Repeat-loop

**URL:** <https://community.gatling.io/t/values-in-a-feeder-is-always-the-same-despite-a-repeat-loop/2378>\
**Category:** Gatling (Open-Source)\
**Created:** [June 23, 2015, 6:45pm UTC](https://community.gatling.io/t/values-in-a-feeder-is-always-the-same-despite-a-repeat-loop/2378 "2015-06-23T18:45:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fugmag](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@fugmag](https://community.gatling.io/u/fugmag)\
**Post date:** [June 23, 2015, 6:45pm UTC](https://community.gatling.io/t/values-in-a-feeder-is-always-the-same-despite-a-repeat-loop/2378/1 "2015-06-23T18:45:21Z")

</div>

My scenario does not pick the next value in my feeder file.  
It always picks the first value for each repeat in the loop. Why does it not pick the next one for each repeat-call. I can see that 20 https calls are made.

`

**val** _scnEtikettBestilling_ = _scenario_( **“LabelOrder”** )

.feed(csv( **“data/pdaArticle.csv”** ).circular)  
.feed(csv( **“data/pdaTestData.csv”** ).circular)  
.feed(csv( **“data/PdaStoreNames.csv”** ).circular)

.exec(_flushCookieJar_)  
.exec(_flushHttpCache_)

.exec(_http_( **“LOGIN”** )  
.get( **"/neptune/UI5\_RETAIL\_APPCACHE?sap-client=300&appcache=HHH"** )  
.headers(_headers_)  
.basicAuth( **"${username}"** , **"${password}"** )  
.check(_status_.is(200)))

.exec(_http_( **“LabelgMenuElement”** )  
.post(_uri2_ + **“?ajax\_id=GET\_CARTS\_TOTAL&ajax\_applid=UI5\_RETAIL\_ORDER\_LABEL&field\_id=00309&ajax\_value=undefined”** )  
.headers(_headers_)

.formParam( **"""{“WERKS”:"${storenumber}",“NAME1”:"${storename}"}"""** , **“”** )  
.check(_jsonPath_( **"$.modelpageStartData.TOTAL\_LISTS"** ).saveAs( **“total\_lists”** ))  
.check(_jsonPath_( **"$.modelpageStartData.LIST\_ID"** ).saveAs( **“list\_id”** )))

.exec(session =\> {  
_println_((session( **“total\_lists”** ).as[String]))  
session})

.repeat(20)

{

exec(_http_( **“AddArticle”** )

.post(_uri2_ + **“?ajax\_id=GET\_ARTICLE\_DETAILS&ajax\_applid=UI5\_RETAIL\_ORDER\_LABEL&field\_id=00055&ajax\_value=${art}”** )  
.headers(_headers_)  
.formParam(**"""{“WERKS”:"${storenumber}",“NAME1”:"${storename}",“LIST\_ID”:${list\_id},“TOTAL\_LISTS”:"${total\_lists}",“DEVICE\_ID”:“win8ff38”,“HEADER\_TEXT”:"",“HASH\_BASED\_MESSAGE\_AUTHENTICAT”:"",“ID”:"",“REVISION”:0,“LABEL\_TYPE\_LOCKED”:false,“LABEL\_TYPE”:“0”}||{}||{}||{}||[{“ID”:0,“NAME”:“Standard”},{“ID”:23,“NAME”:“Etikett (11 x 2) Butikkringen”},{“ID”:24,“NAME”:“Liten etikett (5 x 3) Butikkringen”},{“ID”:41,“NAME”:“Prislapp (36 x 17)”},{“ID”:51,“NAME”:“IS prislapp 48 x 28”},{“ID”:61,“NAME”:“G etikett 72 x 39”},{“ID”:301,“NAME”:“Etikett 11 x 2 Plenty”},{“ID”:321,“NAME”:“Neste Stopp prislapp u.pris”},{“ID”:325,“NAME”:“Prislapp uten pris (11 x 3)”},{“ID”:344,“NAME”:“Prislapp (rull 25 x 60)”},{“ID”:351,“NAME”:“ÖoB medium”}]"""**, **“”** )  
.basicAuth( **"${username}"** , **"${password}"** ))  
}

.exec(_http_( **“LOGOUT”** )  
.post(**“[http://xxx:8300/neptune/native/neptune\_login\_ping.html?sap-clearsso2](http://xxx:8300/neptune/native/neptune_login_ping.html?sap-clearsso2)”**)  
.basicAuth( **"${username}"** , **"${password}"** ))

setUp(_scnEtikettBestilling_.inject(atOnceUsers(1))).protocols(_httpProtocol_)  
}

`

---

<div class="post-metadata">

**Author:** ![jarrowwx](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jarrowwx](https://community.gatling.io/u/jarrowwx)\
**Post date:** [June 23, 2015, 7:05pm UTC](https://community.gatling.io/t/values-in-a-feeder-is-always-the-same-despite-a-repeat-loop/2378/2 "2015-06-23T19:05:43Z")

</div>

Put the .feed() inside the .repeat { } block.

---

<div class="post-metadata">

**Author:** ![fugmag](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@fugmag](https://community.gatling.io/u/fugmag)\
**Post date:** [June 23, 2015, 7:22pm UTC](https://community.gatling.io/t/values-in-a-feeder-is-always-the-same-despite-a-repeat-loop/2378/3 "2015-06-23T19:22:58Z")

</div>

thanx!
