Hello community.
I did a pre-request script that checks the value of an environment variable and increments the value +1 at each iteration and update the value. Everything worked just fine up until some point (after a merge between collections), now it does not check with the environment variables to read the value and does not increment it as well. At every iteration it logs a value smaller than the value that is in the environment variables.
let currentValue = pm.environment.get("env_var");
let incrementedValue = (parseInt(currentValue, 10) + 0).toString().padStart(10, '0');
pm.environment.set("value", incrementedValue);
console.log("value:", incrementedValue);
I did the usual IT guys fixes(quit postman, restart machine, etc), but nothing worked.
Similar scripts are used for other variables, but only this script is not working. Do you have any Ideea why?