# re-use generated value

**URL:** https://community.gatling.io/t/re-use-generated-value/2113
**Category:** Gatling (Open-Source)
**Created:** [March 13, 2015, 6:54pm UTC](https://community.gatling.io/t/re-use-generated-value/2113 "2015-03-13T18:54:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![empty\_account](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@empty\_account](https://community.gatling.io/u/empty_account)
#### Post date: [March 13, 2015, 6:54pm UTC](https://community.gatling.io/t/re-use-generated-value/2113/1 "2015-03-13T18:54:51Z")

</div>

Hi,

I have created an email that includes a random integer.

.formParam(“email”, session =\> s"random@${new Random().nextInt(Int.MaxValue)}.com")

However, I wondered if it was possible to save that value and use it in another request?

Many Thanks

Adrian

---

<div class="post-metadata">

### Author: ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)
#### Post date: [March 13, 2015, 8:36pm UTC](https://community.gatling.io/t/re-use-generated-value/2113/2 "2015-03-13T20:36:15Z")

</div>

Just set it first in the session. exec(\_.set(“randomDomain”, …))
