Conditional Branching???

  • I have to be kind of vague because I haven't done this before.  However, a coworker has and this is what I've been told.

    Create your ForEach Container with all the steps inside to search for the version.  Create a Global package variable and use the container's steps to set it to either 2000 or 2005, depending on the version (or use Yes/No, 0/1, etc.).  Edit the precedence constraint leading from the ForEach Container to the next two tasks.  Set it to be either Expression or Expression And Constraint. Note: We use the later.  It has to be a Success AND the Expression has to = 1 or it has to be a Success AND the Expression has to = 0.  It cannot be a Fail in either step.

    Anyway, your Expression is going to be @Var = 2000 or @Var = 2005 (or whatever value you're using).  Essentially, you're doing a Boolean comparison along with your Success/Fail step.

    Does this help?

     

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Thanks for the reply.  I was able to accomplish the conditional branching by using an empty script task and setting the constraint precedence to Success and @var < 2001 or Success and @var > 2001.

    For some reason I couldnt do a comparison like @var = 2005 because @var was a string value. /shrug

     

    Thanks again. 

  • You're welcome and I'm glad you could get it to work.

     

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 3 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply