vadim.tabakman@nintex.com

AND or OR, That is the Question

Blog Post created by vadim.tabakman@nintex.com Employee on Jun 17, 2015

This is where Nintex Workflow meets Shakespeare.  Ok maybe not.

 

But seriously, wow what a release the June 2015 is turning out to be.  Are you ready to start building complex workflow? No????  That's ok... the aim of this post is not to be complicated, but to actually reduce the size of your workflows.  That's because with the addition of the AND and OR functionality, where you previously had nested Conditional Branches, Loops or Run Ifs, now you can configure the multiple conditions into the single action.

 

This is what the workflow could have potentially looked like before :

BeforeWorkflow.png

Now that's not too bad, but imagine a big workflow and then it gets quite hard to maintain

So with this release, the above workflow design, changes to this:

AfterWorkflow.png

Isn't that a huge change?  Not only will it reduce the size of the workflow, but it will mean that modifying it and maintaining it over time will so much easier.

 

But what would it now look like inside the action?

MultipleConditionspng.png

 

Notice how we can add other conditions by simply clicking on the Add condition link.

 

The new, dynamic ability to add AND/OR conditions into actions is available in the following actions:

  • Conditional Branch
  • Loop
  • Run If

 

Take the following workflow as an example:

WorkflowDesign.png

Now that is a cropped version of a workflow I was building around an expense claim.  Part of that is a number of Conditional Branches and also a Loop action.  Now, the Conditional Branches have a number of conditions and the Loop has about 4 conditions.  Imagine having to build that out with the ability to have the multiple conditions in these actions.

 

This is what I was getting at, in that we're not talking about complexity.  In fact, we're actually streamlining the workflow design.  Building Nintex Workflows gets better and better.

 

I've attached the workflow to this post.  It's not a real workflow, in that, it's not usable in it's current state.  But will show you some ideas behind this new AND/OR logic.

 

Adding and Removing Conditions

 

Now that you know you can have multiple conditions, how do you do it?

Each of the actions mentioned above come with an extra link in the configuration window of the action.  It's named Add a Condition  Simply click on that, and it will give you an extra section for a condition.  Click it again, and you get another section.  It's a little like adding rows dynamically to a Repeating Section in Nintex Forms.

HowToAddaCondition.png

What you will also get with each new section, is ability to remove it if you need to.  There is a Red X in each section and by clicking on that, it removes that section, but leaves the rest intact.

HowToDeleteaCondition.png

Beware though, it doesn't give you a confirmation popup asking if you're sure you want to delete that section, it simply deletes it.  But if you think about it, why do you need a confirmation, since you can just cancel out of the action configuration window, open it again and the sections will be there.

 

To Use AND or OR, or just AND, or just OR, or OR and OR???

 

Is that the question? Is that actually a question?  What am I talking about here?

 

The interesting thing about having the ability to build AND/OR conditions, is that it's quite easy to get lost in your own head when you're putting together the condition.  What I recommend, is that you take a look at the Nintex Office 365 Help topic on "Logic operators" as it'll help you figure out the order or precedence for the AND/OR functionality.

 

The other thing I recommend, is keep it simple first. Build some simple conditions and run those workflows.  Set some tasks for yourself to get your head around. Once you get it, it'll be so much easier.

 

If you have any questions or comments, please post them at the bottom of this post.

Outcomes