Stepper icon indicating copy to clipboard operation
Stepper copied to clipboard

Can we centralise the variables?

Open iamyuthan opened this issue 3 years ago • 5 comments

Can we make the below format as the centralised variable call both inside and outside the stepper? $VAR:Sequence:VariableName$

Because it will allow us to call the variables between different sequences.

When we use any match and replace rules to replace the parameter with the stepper variable, it will replace it in the stepper sequence as well. That time stepper won't execute the variable as this format is used inside the sequence.

iamyuthan avatar Nov 27 '21 04:11 iamyuthan

This would be very nice. In addition, it would be nice if the "X-Stepper-Execute-Before" header worked inside of stepper itself

CrazyKidJack avatar Jul 18 '22 18:07 CrazyKidJack

I really need this feature to have global variables for the whole Stepper just like the Postman application.

My use case: An access token is being generated using the Stepper, however, the response has a new refresh token which needs to be used in the first sequence step when asking for the next access token; and this continues

irsdl avatar Jan 19 '23 10:01 irsdl

Just to confirm, would it be better to make the "Globals" tab apply to all sequences, and each sequence instead have its own separate variables tab?

CoreyD97 avatar Mar 01 '23 13:03 CoreyD97

I agree with that if it makes it easier. But two questions:

  • Should Global has prioritisation over the local if their name are the same or are they following different naming convention?
  • What if we want to use a local variable only when a global one with the same name was empty or the other way round? Can we have an easy solution for this? (HackVertor may help but then its order is important)

Postman for example have this Globals and Env variables which also have initial value and current value - I wonder which one has the priority: image

irsdl avatar Mar 01 '23 14:03 irsdl

My thoughts on this are that Globals would be used initially, and if a sequence redefines that variable then it'd overwrite the global.

What if we want to use a local variable only when a global one with the same name was empty or the other way round?

I'm not sure what usage you're thinking of here. If you wanted to switch between using a global or local variable without having to remove/redefine it each time, maybe an option to enable/disable each variable would work?

CoreyD97 avatar Mar 01 '23 14:03 CoreyD97