According to the documentation at http://docs.octopusdeploy.com/display/OD/Variable+Substitution+Syntax, a variable can be used to perform a repetition of substitutions but there is no way to obtain a position or index value to use during the iteration. So lets say I have the following variable:
Thanks for getting in touch! You can use the Iterating over sets of values feature outlined in that document. In your case, you variables would look something like this:
Name Value
Urls[1].Value www.google.com
Urls[2].Value www.yahoo.com
Thanks for the reply, I had not noticed that the value between parenthesis was available; however this approach yields a large number of variables in the context that I am using it.
I have 4 URLs that are different per environment and we have a total of 13 different environments, so this approach requires a total of 52 variables instead of just 13 variables.
I noticed that OctoStache uses the Sparce library and that there are other values that could be made available for the purpose of transformations to have more flexibility like the one I am mentioning. I will add it as a suggestion to the roadmap.