mystack
mystack

Reputation: 5482

Retrive Variable in a variable group using another variable

I have variable group variable as given below

 opp453.Name = "Raj"
 pqr325.Name = "Shyam"

I know can I retrieve the variable group as below

$(opp453.Name) or $(pqr325.Name)

If I have another variable

$ptrref=opp453 or
$ptrref=pqr325

Then how can I refer to this variable inside the first variable

$($ptrref.Name)

to retrieve the original value

Upvotes: 0

Views: 118

Answers (1)

mbb5079
mbb5079

Reputation: 766

I think this is impossible to achieve at present because Nested variables are not supported yet in build pipeline/variable group.You can check this similar thread for some more details.

We could also use the same workaround, using InlinePowershell task to determine the value of ptrref, and set the value of opp453.Name/ pqr325.Name according to the value of ptrref.

Upvotes: 1

Related Questions