I used to have a 2010 Workflow that had conditions like this: enter image description here

I feel like the best way to write this in SP Designer 2013 is like this, but is there a better way: enter image description here

  • 1
    You could set a workflow variable in the first If-Else statement called something like varChangeAwaiting and set it to a specific value. Then you can just do the second If-Else statement as if varChangeAwaiting equals <value>. Then if the boolean equation changes, you just have to change it in one spot (the first If-Else and not the second. Let me know if that helps or need a better explanation. – KGlasier Dec 3 '18 at 22:31
  • KGlasier: Thanks for your comment! Let me make sure I'm understanding completely: EDIT (line breaks don't work)..... So in the workflow action steps, I make a workflow variable, and set it to true, then when I get to the transition section, I just reference that variable and make the logic choices there, instead of the long conditional - correct? – phfb Dec 3 '18 at 22:34
  • 1
    Yes I think that's what you want to do. I'll make a post about it just to make sure it's clear. Sorry I commented before your EDIT. Deleted my last comment. – KGlasier Dec 3 '18 at 22:46

You could set a local variable in SPD Workflow called varChangeAwaiting and set it to a boolean type, as follows:

enter image description here

Then set your If-Else up as you already have it but add the local variable. Sorry for not having the exact same if-else statement as you, but I did this in a bit of a rush.

enter image description here

Does that make sense? Now if you ever have to change the if-else you can just change it in one spot and the boolean will still flip. There's a chance you'll need to do a Set Variable: varChangeAwaiting to No at the top of your stage to initialize the variable, but it might default to No.

| improve this answer | |
  • This makes good sense. Bummer SP's not just in python, but this is a big improvement. Thanks! – phfb Dec 3 '18 at 22:53
  • @phfb I wish we could use some sort of programming language, at least. Would make life so much easier on our end. – KGlasier Dec 3 '18 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.