Is it possible to access a variable's initial value in a Pre-request Script?

Is there any way to retrieve a variables initial value in a pre-request script?

I know I can get the current value from:


However, I am looking to use the initial value to build the current value depending on the request being made. I have two different pre-request scripts, one for each collection. It would be nice to be able to do something like this:


pm.globals.set("key-goes-here", pm.globals.initial.get("key-goes-here") + "/requests/");


pm.globals.set("key-goes-here", pm.globals.initial.get("key-goes-here") + "/ims/v1p1/");

The current value takes it’s default from the default value when the collection/environment is imported.

My understanding is that this initial/current thing is just an abstraction used in Postman to keep some things private. Technically there is only one value that is used / accessible.

And honestly, adding initial to scripting will just overcomplicate everything.

I hope you find a workaround for your use-case.

Not sure if I am totally understanding the ask here but I am sure you can do something where you make the 1st call and reference the initial value like this:

var initialVal = pm.globals.get("initialVal");
pm.globals.set("updatedVal", initialVal + "/requests/");

Then in any subsequent script you can either overwrite the value or concat to it doing something like this:

pm.globals.set("updatedVal", "/ims/v1p1/");


var updatedVal = pm.globals.get("updatedVal");
pm.globals.set("updatedVal", updatedVal + "/ims/v1p1/");

Not sure if I am off the mark on this but I am sure you can do something via script to achieve what you are looking to do.