Variable Conditionals and using OR statement

Hi Guys,

I am using Variable Conditional statement trying to acheive something like this:

#{if Octopus.Deployment.Tenant.Name == "PreProd" || Octopus.Deployment.Tenant.Name == "Production"}prod#{else}uat#{/if}

However, I quickly discovered OR is not supported :frowning:

What is the cleanest ā€œhackā€ to acheive this and still have the config readable?

I created a feature request in user voice - Anyone interested please vote hereā€¦

I saw this post, but it didnā€™t help me constructing an alternative OR statement solutionā€¦

Thanks,
Emil

Hi Emil,

Thanks for getting in touch! You are unfortunately correct that this is not currently a support feature. The suggestion from Dalmiro in the post you linked is a handy workaround to get an AND to work, but the OR is still not possible.

The subject comes up internally every now and then but itā€™s not something we have decided to commit to yet. I think the UserVoice suggestion is going to be the best option for this right now.

If you have any further thoughts or questions on this, please let me know.

Best regards,
Daniel

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