Confusion with Octopus Variable Substitutions "Complex Syntax"

In the Complex Syntax section of the Octopus Documentation page Variable Substitutions, there is an example provided as below:

#{if ATruthyVariable}
  Pick me if true
#{else}
  Pick me if false
#{/if}

Are the words “if true” and “if false” required along with each value in the value field? It is not very clear in the documentation, because as a sentence, “Pick me if true” reads as though it is not required, but the words “if”, “true” and “false” are formatted like in an IDE.

It would have really resolved a lot of ambiguity, and saved me a lot of time, if an actual example were provided along with the format.

Hi,

Thanks for getting in touch! I’m sorry that the formatting and wording of this section in the docs was too ambiguous and caused confusion! We appreciate you providing this valuable input to help us improve upon our documentation. I’ve had a quick look through that page, and I can’t initially spot where that IDE-like formatting is coming from but I’ll try to sort it out shortly.

The “if true” and “if false” are not required. Would something like the wording below be more clear in the future?

#{if ATruthyVariable}
   Do this thing
#{else}
   Do this other thing
#{/if}

I look forward to hearing back, and don’t hesitate to reach out if you have any further questions moving forward!

Best regards,

Kenny

That would be way more clear. But as a user, if a quick example with real values were provided, I wouldn’t have to worry again about the syntax, as opposed to now where I have to run a deployment and see if the variables were properly substituted before being absolutely sure.

By the way, here’s a link to the section I was referring to: https://octopus.com/docs/deployment-process/variables/variable-substitutions#complex-syntax

Hi,

Thanks for following up and letting me know your thoughts. I’m intending on updating that example in the doc page very soon, and I was wanting to thank you once again for providing this input. Don’t hesitate to reach out if you have any questions or concerns in the future. :slight_smile:

Best regards,

Kenny

1 Like

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