locked
Writing OR check condition in process workflow ? RRS feed

  • Question

  • We are using CRM Online 5

    How should I get an OR condition between a set of clauses under check condition ?

    Also how is it possible to include a combination of AND and OR clauses ?

    Wednesday, May 30, 2012 6:16 PM

Answers

  • 'Or' conditions cannot be directly implemented via Workflow.  However, you can "model" an Or condition via either:

    1. Logic theory (see Leon Tribe's post for a very good explanation http://leontribe.blogspot.com.au/2012/03/using-or-condition-in-workflows.html)
    2. Child Workflows - you could use successive Check Condition branches and all the same Child Workflow from each.  E.g.:
    if (test == "one")
      Call ChildWorkflow()
    else if (test == "two")
      Call ChildWorkflow()
    else if (name == "fred")
      Call ChildWorkflow()
    

    which is the equivalent of:

    if (test == "one") || (test == "two") || (name == "fred")
      Call ChildWorkflow()
    

    Combining AND and OR conditions will be more tricky, but can be achieved using (possibly combinations of) these mechanisms.



    --pogo (pat) @ pogo69.wordpress.com

    • Marked as answer by boo oinky Thursday, May 31, 2012 3:21 AM
    Wednesday, May 30, 2012 11:26 PM