# Are there plans for PM variables saved using the pm method retain their data type?

**URL:** <https://community.postman.com/t/are-there-plans-for-pm-variables-saved-using-the-pm-method-retain-their-data-type/171>\
**Category:** Help Hub\
**Tags:** pm, datatypes\
**Created:** [November 9, 2017, 2:05pm UTC](https://community.postman.com/t/are-there-plans-for-pm-variables-saved-using-the-pm-method-retain-their-data-type/171 "2017-11-09T14:05:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![postman-paul540](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/postman-paul540/32/149_2.png) [@postman-paul540](https://community.postman.com/u/postman-paul540)\
**Post date:** [November 9, 2017, 2:05pm UTC](https://community.postman.com/t/are-there-plans-for-pm-variables-saved-using-the-pm-method-retain-their-data-type/171/1 "2017-11-09T14:05:21Z")

</div>

Hi.  
Just a simple question if variables saved using pm.environment.set(“name”, path) will eventually keep their data type?  
Given I have saved an environment variable which was a number, let’s say 35.  
And in a different endpoint, I want to assert the correct value is returned.  
The below will fail as the postman variable is now a string.

```auto
    pm.test('Summary.Count = ' + environment.reviewCount, function() {
        pm.expect(summary[0].count).to.equal(environment.reviewCount);
    });

```

The above will fail, but the below will pass:

```auto
    pm.test('Summary.Count = ' + environment.reviewCount, function() {
        pm.expect(summary[0].count).to.equal(parseInt(environment.reviewCount));
    });

```

I’m just wondering if there’s plans, when using the new pm method, to keep the data types instead of conveting everything to strings?

---

<div class="post-metadata">

**Author:** ![abhinav](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/abhinav/32/8_2.png) [@abhinav](https://community.postman.com/u/abhinav)\
**Post date:** [November 9, 2017, 8:15pm UTC](https://community.postman.com/t/are-there-plans-for-pm-variables-saved-using-the-pm-method-retain-their-data-type/171/2 "2017-11-09T20:15:30Z")

</div>

Yep. They should retain their data type. @kunagpal Can you clarify this?

We have a feature on the roadmap that will allow everyone to edit complex data types inline so if it doesn’t work right now, it should be possible in the next couple of weeks.

---

<div class="post-metadata">

**Author:** ![kunagpal](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/kunagpal/32/9_2.png) [@kunagpal](https://community.postman.com/u/kunagpal)\
**Post date:** [November 10, 2017, 7:39am UTC](https://community.postman.com/t/are-there-plans-for-pm-variables-saved-using-the-pm-method-retain-their-data-type/171/3 "2017-11-10T07:39:57Z")

</div>

Yes, this is on the roadmap. We’re currently working on app-side improvements to streamline the user experience for such nested types. For now, you’ll have to use the stringify/parse routine.

---

<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:** [December 9, 2024, 2:35pm UTC](https://community.postman.com/t/are-there-plans-for-pm-variables-saved-using-the-pm-method-retain-their-data-type/171/4 "2024-12-09T14:35:45Z")

</div>

Closed on December 9, 2024, 2:35pm UTC

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