Step conditions - Only when failed AND variable is true

Hi Tim,

Thanks for getting in touch! While you can create a run condition based on two variables using the syntax #{if Var1}#{Var2}#{/if}, this may be possible using the solution as outlined in the following thread post.

They were doing the opposite, where a step would run conditionally both on a prompted variable == True and on success of previous steps. I haven’t had a chance to give this a test, but it may work on deployment failure using something like #{if Octopus.Deployment.Error}#{PromptedVariable}#{/if}. Let me know if you have any luck with something like that. :slight_smile:

We also have some additional information in our system variables doc page on tracking deployment status.
https://octopus.com/docs/deploying-applications/variables/system-variables#Systemvariables-DeploymentStatusTrackingdeploymentstatus

If you’d like to see the && and || syntax, we have a current UserVoice suggestion to implement this. Feel free to throw it some votes if you’d like to see this alternative to the nested #{if} conditions. :slight_smile:

Let me know if this helps! Don’t hesitate to reach out if you have any further questions.

Best regards,

Kenny