Problem in storing comma separated values in octopus output variable

(Saurabh Ghildiyal) #1

I was trying to store a comma separated value in Octopus output variable but that comma gets converted to space when I print it later.
eg $anyString = “Hello,Hi”

Set-OctopusVariable -name “Test” -value “$anyString”
#{Octopus.Action[Set Target List].Output.Test} will give me- Hello Hi.
Am I doing something wrong here? I need a comma separated target role list so I can replace it in some configuration file using variable substitution.

(Saurabh Ghildiyal) #2

This is working now after using an escape character:
$anyString = “Hello`,Hi”

(Paul Calvert) #4

Hi @saurabh.ghildiyal,

That’s great to hear that you got it working. Thanks for sharing the solution too :slight_smile:


(system) closed #5

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