# Collection Pre-requisite Scripts : Can not read the global variable set in request test

**URL:** <https://community.postman.com/t/collection-pre-requisite-scripts-can-not-read-the-global-variable-set-in-request-test/15267>\
**Category:** Help Hub\
**Created:** [August 24, 2020, 12:43pm UTC](https://community.postman.com/t/collection-pre-requisite-scripts-can-not-read-the-global-variable-set-in-request-test/15267 "2020-08-24T12:43:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musaffirlp](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@musaffirlp](https://community.postman.com/u/musaffirlp)\
**Post date:** [August 24, 2020, 12:43pm UTC](https://community.postman.com/t/collection-pre-requisite-scripts-can-not-read-the-global-variable-set-in-request-test/15267/1 "2020-08-24T12:43:41Z")

</div>

Hi folks

Could you please have a quick look at the below link and let me know if anything wrong there in my script.

> <https://github.com/postmanlabs/postman-app-support/issues/8965>
>
> Hi,
> 
> It is observed that if i \*\*set a global variable in a request test\*\*, (sa…y step 1) the same global variable can't be read back by invoking a function which is at collection pre-requisite script, with in the same execution of the request (say step 2).
> 
> pm.globals.get("varibaleName") returns it as undefined, but at the same time i see the variable gets persisted in the postman ide global variable section.
> 
> To reproduce this issue, I have attached a small collection here which contains 1 requests of \[https://petstore.swagger.io/\](petstore)
> \[Bug Repo.zip\](https://github.com/postmanlabs/postman-app-support/files/5117531/Bug.Repo.zip)
> 
> Postman Version : Postman v7.30.1 (on windows 10)
> 
> 
> Thanks & Warm Regards
> Musa

Thanks & Warm Regards,
