4

Does anyone know of a way to access a global variables initial value?

I know you can access it's current value through:

pm.environment.get("variable-key");

I am working on a pre-request script that would benefit from accessing an initial value so that I could dynamically set it's current value.

Dan Whitehouse
  • 548
  • 1
  • 6
  • 18

1 Answers1

0

In the current version of POSTMAN which is version v.7.3.3 setting value in environment variable change both values Initial and Current.

But answer to your question. There is one way to resolve your problem:

  • Store the initial value in some variable before setting new value in an environment variable, So you will have initial value in the stored variable and current value in the environment variable.