# Store value into a variable

**URL:** <https://community.postman.com/t/store-value-into-a-variable/41163>\
**Category:** Help Hub\
**Tags:** tests, variables\
**Created:** [November 16, 2022, 2:06pm UTC](https://community.postman.com/t/store-value-into-a-variable/41163 "2022-11-16T14:06:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoelsarmiento](https://avatars.discourse-cdn.com/v4/letter/y/9dc877/32.png) [@yoelsarmiento](https://community.postman.com/u/yoelsarmiento)\
**Post date:** [November 16, 2022, 2:06pm UTC](https://community.postman.com/t/store-value-into-a-variable/41163/1 "2022-11-16T14:06:07Z")

</div>

Hello there!!

im testing user creation and every time it gives me a diferent id number, because of that i always have to change the value of my variable for future tests, so what i want to know is how to store whatever id number gives me into a variable.

every help is appreciated

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [November 16, 2022, 7:20pm UTC](https://community.postman.com/t/store-value-into-a-variable/41163/2 "2022-11-16T19:20:41Z")

</div>

This is covered in the Learning Centre.

[Postman Galaxy Training | Postman API Network](https://www.postman.com/postman/workspace/postman-galaxy-training/overview)

Run through the “APIs 101 Training”, then the “Testing and Automation Training” course.

---

<div class="post-metadata">

**Author:** ![adambellasps](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/adambellasps/32/10750_2.png) [@adambellasps](https://community.postman.com/u/adambellasps)\
**Post date:** [November 17, 2022, 4:18pm UTC](https://community.postman.com/t/store-value-into-a-variable/41163/3 "2022-11-17T16:18:42Z")

</div>

In addition to the helpful training course already cited, the [reference documentation for using variables in Postman](https://learning.postman.com/docs/writing-scripts/script-references/postman-sandbox-api-reference/#using-variables-in-scripts) should steer you right to what you need.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 14, 2023, 8:14pm UTC](https://community.postman.com/t/store-value-into-a-variable/41163/4 "2023-09-14T20:14:52Z")

</div>

Closed on September 14, 2023, 8:14pm UTC


