Reference a variable in scope of a variable set

Is it possible to reference a variable in scope of a variable set when creating variables at the project level? Like this:

The main reason I want to do this is so I can scope variable set variables to project steps.

Hi Tyson,

A variable in a project can definitely reference a variable in a library variable set, but not one with the same name as that will result in a cyclical reference error. However, if you use a different name, or prefix the variable in the library variable set (as you did in your example) it will work just fine. In other words, your example will work perfectly if you name the variable in the library variable set VariableSetName.ApplicationName.

I hope that isn’t too confusing and that the information is helpful. Please let me know that is not the case and I’ll try to assist you further!

Regards,
Jayden

That makes sense. I will have to see if I can make that happen. I don’t want to edit the sets in a way that will cause other people to have to make config changes. And I do not want to bloat the variable sets if not absolutely necessary.

My main hope was to be able to use the variable set name as a prefix when referencing a variable within it. From your response, it sounds like that is not possible?

Hi Tyson,

Unfortunately, no, it is not possible. You could change the name of the variables in the project instead so you can avoid changing the variable set. Obviously this will cause issues if you are using the “Configuration Variables” or “Configuration Transforms” features, but you may be able to overcome those issues by using the “Substitute Variables in Files” feature instead.

If you’d like some assistance going down that path, just let me know.

Regards,
Jayden

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.