# Dynamic variables

**URL:** <https://community.postman.com/t/dynamic-variables/14798>\
**Category:** Help Hub\
**Tags:** variables\
**Created:** [August 6, 2020, 7:38pm UTC](https://community.postman.com/t/dynamic-variables/14798 "2020-08-06T19:38:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![apalani2](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@apalani2](https://community.postman.com/u/apalani2)\
**Post date:** [August 6, 2020, 7:38pm UTC](https://community.postman.com/t/dynamic-variables/14798/1 "2020-08-06T19:38:55Z")

</div>

I am currently using the older Version 5.3.2, because of its nature(No auto-generated/default header) So is there a way to disable the default header in the newer version?

In the version, I am using, How to generate a random value(alphanumeric) and use it?

pre-request script:

```auto
pm.environment.set("regSessionID", getRandomValue());

function getRandomValue() {
    const regSessionID = "{{$randomPassword}}";
    console.log(pm.environment.get("regSessionID"));
    return regSessionID;
}

```

Env variable as:

`regSessionID: {{$randomPassword}}`

---

<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:** [August 6, 2020, 8:15pm UTC](https://community.postman.com/t/dynamic-variables/14798/2 "2020-08-06T20:15:43Z")

</div>

Hey @apalani2

Welcome to the Postman community! 🚀

Which auto Headers are you referring too, in the newer version. You have the ability to disable all of them.

I’d be surprised if that `pm.*` API syntax or the dynamic variables even work in that version.

---

<div class="post-metadata">

**Author:** ![apalani2](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@apalani2](https://community.postman.com/u/apalani2)\
**Post date:** [August 6, 2020, 8:27pm UTC](https://community.postman.com/t/dynamic-variables/14798/3 "2020-08-06T20:27:30Z")

</div>

![image](https://us1.discourse-cdn.com/getpostman/original/2X/7/7babf2227debd2fda330c90ad400cf45245b4714.png)

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/f/f8618a03ec77ce52f2da869dc859bbb303aacac7.png)

Visual for both old and new version headers.

pm.\* API syntax for dynamic is supported in 5.x.x version onward?

---

<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:** [August 6, 2020, 8:36pm UTC](https://community.postman.com/t/dynamic-variables/14798/4 "2020-08-06T20:36:51Z")

</div>

Ah right I knew that it was introduced back in V5 but wasn’t sure how far back. The random faker dynamic variables won’t work in V5 thought right? You might have access to $randomInt, $timestamp, $timestamp but not the others in V5

If you go to `settings` in the top right of the app. You can disable those other Headers (cache-control and postman token) The Content-Type header can be removed if you’re not sending a JSON body.
