Reference a variable from one variable set in another?

Hi everyone,

we have various different variable sets. Is it possible to reference a variable from one set to another?

For example, we have variable set “A” that has variable “foo”. Would it be possible to reference this variable in set “B”, so we could do something like “#{Octopus.VariableSet[“A”].foo}/bar” there?

Or is there a better idea/way to create a combination variable with values from set A and B?

Thanks for your help and kind regards,
Anita

Hi Anita,

Thanks for getting in touch!

This should be possible.
When a deployment starts, all variables from all linked library sets are loaded together without separating.
So, to reference a variable from another set, you don’t need to reference that set specifically; just the variable name will do.

e.g.
Variable Set 1

Variable Set 2

Test Script

Output
image

Regards,
Paul

Hi Paul,
thank you so much for your quick reply.
Awesome that it can be done this easily, as usual, I was thinking way to complicated. :wink:
Thanks again and kind regards,
Anita

2 Likes