# Feeder Value

**URL:** https://community.gatling.io/t/feeder-value/1472
**Category:** Gatling (Open-Source)
**Created:** [September 26, 2014, 6:59am UTC](https://community.gatling.io/t/feeder-value/1472 "2014-09-26T06:59:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Empty\_Account1](https://avatars.discourse-cdn.com/v4/letter/e/5f8ce5/32.png) [@Empty\_Account1](https://community.gatling.io/u/Empty_Account1)
#### Post date: [September 26, 2014, 6:59am UTC](https://community.gatling.io/t/feeder-value/1472/1 "2014-09-26T06:59:00Z")

</div>

Hi,

I have a csv file that is read by the feed method and I’d like to parse the value that is returned

…  
val locCookieData = csv(“loc-cookies.csv”).circular

def parseId(str: String) = “[0-9]{7}”.r findFirstMatchIn str mkString

val scn = scenario(“SampleRequest”)

.feed(locCookieData)

.exec(http(“location id”)  
.get("/start/url/" + parseId("${locCookie}")))

…

However, when I pass the “${locCookie}” to the parsedId function, the value “${locCookie}” is passed and not the value from the CSV file.

If I do not pass “${locCookie}” as a parameter to the method, the file value is returned.

I wonder how I can pass the “${locCookie}” value to the parseId function?

Many Thanks

Aidy

---

<div class="post-metadata">

### Author: ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)
#### Post date: [September 26, 2014, 7:45am UTC](https://community.gatling.io/t/feeder-value/1472/2 "2014-09-26T07:45:01Z")

</div>

Hi Aidy,

None of this will work, for the very good reason that you’re trying to mix Scala code and Gatling EL, and passing static values instead of lambdas.

Please have a look at the documentation and then ping if things are still unclear: [http://gatling.io/docs/2.0.0-RC5/session/expression\_el.html](http://gatling.io/docs/2.0.0-RC5/session/expression_el.html)

---

<div class="post-metadata">

### Author: ![Shane\_Smith](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Shane\_Smith](https://community.gatling.io/u/Shane_Smith)
#### Post date: [June 28, 2017, 11:49am UTC](https://community.gatling.io/t/feeder-value/1472/3 "2017-06-28T11:49:51Z")

</div>

What would be suggested to someone who still wanted/needed to do this? Is there any type of work around or direction to go in?

---

<div class="post-metadata">

### Author: ![vu.nguyen](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@vu.nguyen](https://community.gatling.io/u/vu.nguyen)
#### Post date: [June 28, 2017, 9:24pm UTC](https://community.gatling.io/t/feeder-value/1472/4 "2017-06-28T21:24:26Z")

</div>

> What would be suggested to someone who still wanted/needed to do this? Is there any type of work around or direction to go in?

You have requestName as Expression[String] which is a type alias of Session =\> Validation[T].

> **[HTTP Request](https://gatling.io/docs/gatling/reference/current/http/request/)**
>
> Create HTTP requests

> **[Expression Language](https://gatling.io/docs/current/session/expression_el/#expression)**
>
> How to use Gatling Expression Language to compute dynamic parameters based on Session data using a simple text templating engine
