# New Collection Variable Values Not Being Used

**URL:** <https://community.postman.com/t/new-collection-variable-values-not-being-used/55381>\
**Category:** Help Hub\
**Tags:** variables\
**Created:** [December 6, 2023, 4:29pm UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381 "2023-12-06T16:29:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![descent-module-geo27](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/descent-module-geo27/32/26777_2.png) [@descent-module-geo27](https://community.postman.com/u/descent-module-geo27)\
**Post date:** [December 6, 2023, 4:29pm UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381/1 "2023-12-06T16:29:55Z")

</div>

Have been testing a simple API login using a couple of declared Collection variables, and all was working fine. However, I tried to test another set of login credentials to check the response for invalid credentials and even though I have updated the Collection variables when selecting Send the console response indicates that it is still using the valid values.

How do I get the test to use the new Collection variable values?

---

<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:** [December 6, 2023, 4:38pm UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381/2 "2023-12-06T16:38:48Z")

</div>

Can you post screenshots of your requests, and details on how you are using\updating the collection variables.

---

<div class="post-metadata">

**Author:** ![descent-module-geo27](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/descent-module-geo27/32/26777_2.png) [@descent-module-geo27](https://community.postman.com/u/descent-module-geo27)\
**Post date:** [December 6, 2023, 5:13pm UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381/3 "2023-12-06T17:13:36Z")

</div>

@michaelderekjones, there is very little I can show in the screenshots as I need to hide many of the details. As you’ll see, I’m using a GET verb that uses parameters which worked fine with the initial values entered, i.e. those credentials that should work, but now having changed the email/password parameter values when hitting Send the output in the console shows that the original parameters are still being used - and, therefore, I’m still getting a positive response.

If you need any more info, please ask and I’ll provide what I can.

 ![Screenshot 2023-12-06 at 16.58.30 (1)](https://us1.discourse-cdn.com/getpostman/original/3X/4/8/485edd9abec69056eb9e198712f25a94b04ebc0c.png)

 ![Screenshot 2023-12-06 at 16.57.50](https://us1.discourse-cdn.com/getpostman/original/3X/2/9/29e220479450156f3043ba5209baad65bb832142.png)

---

<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:** [December 6, 2023, 5:31pm UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381/4 "2023-12-06T17:31:01Z")

</div>

The details need to be in the current values.

Also ensure you have clicked on “save” everywhere possible.

---

<div class="post-metadata">

**Author:** ![descent-module-geo27](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/descent-module-geo27/32/26777_2.png) [@descent-module-geo27](https://community.postman.com/u/descent-module-geo27)\
**Post date:** [December 6, 2023, 5:45pm UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381/5 "2023-12-06T17:45:38Z")

</div>

Yes, @michaelderekjones, the values to be tested are listed under _Initial value_ and _Current value_, they’ve simply been removed as I can’t share them.

Everything is saved, and if I exist the program and return the values are persistent. This is why I am at a loss to understand why it is using old variable values.

---

<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:** [December 6, 2023, 5:58pm UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381/6 "2023-12-06T17:58:45Z")

</div>

If you hover over the variable, it should show you what the current value is and what scope is being set from.

Can you confirm that its a collection variable, and not some other scope.

---

<div class="post-metadata">

**Author:** ![descent-module-geo27](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/descent-module-geo27/32/26777_2.png) [@descent-module-geo27](https://community.postman.com/u/descent-module-geo27)\
**Post date:** [December 6, 2023, 8:57pm UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381/7 "2023-12-06T20:57:24Z")

</div>

@michaelderekjones, that’s a neat trick to know. Thanks for pointing it out.

As to which scope is being used, it is reporting it is the Collection scope but displays the original values not the new, saved values.

Again, they’ve had to be removed as I can’t share them.

 ![Screenshot 2023-12-06 at 20.37.45 (1)](https://us1.discourse-cdn.com/getpostman/original/3X/9/9/99699d5696b52753d7411ae83a2bc962e518ba81.png)

---

<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:** [December 7, 2023, 1:13am UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381/8 "2023-12-07T01:13:46Z")

</div>

As @michaelderekjones previously mentioned, can you ensure that all the open tabs are saved.

These might be picking up older values, if you have unsaved changes (tabs with orange dots on them).

You could also try enabling the Autosave feature from the `⚙️ \> Settings \> General menu options, that would mitigate against certain flows and scenarios not working as expected.

---

<div class="post-metadata">

**Author:** ![descent-module-geo27](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/descent-module-geo27/32/26777_2.png) [@descent-module-geo27](https://community.postman.com/u/descent-module-geo27)\
**Post date:** [December 7, 2023, 9:34am UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381/9 "2023-12-07T09:34:19Z")

</div>

OK, @danny-dainton, things are now working but I’m not sure exactly why.

Though I believe everything was already saved, i.e. if I hovered over the Save button it would pop up the message “No new changes to save”, as advised I enabled Autosave. This didn’t immediately resolve the issue, in that if I hovered over a variable it still displayed the original values not the newly set variable values.

Then when looking at a couple of the provided Collections, i.e. Contract Testing and Integration Testing, I noted the Collection variables were using camel case {{baseUrl}}. In contrast, I had used kebab case ({{base-url}} so I changed mine for consistency.

Following this, I then found if I hovered over a variable name it would display the current Collection variable values, i.e. the new values. If I altered the Initial value then this would also be reflected in the values shown.

So everything seems to be working properly now, but I’m not sure as to what exactly has caused it. That said, I’m grate for the help you and @michaelderekjones have given me. I appreciate it.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [January 6, 2024, 9:34am UTC](https://community.postman.com/t/new-collection-variable-values-not-being-used/55381/10 "2024-01-06T09:34:43Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
