locked
Workflow Editor : OR Condition RRS feed

  • Question

  • Hi All,

    How can we have OR condition between two conditions in Dynamics inbuilt workflow editor?

    We always get the AND by default and there is no way we can change that. 

    for e.g. we want check whether email subject contains 'New' or email subject contains 'Test' then want to perform some action but when you select these two condition and press Ok, Dynamics puts them something as follows

    if Email: Subject contains [New] AND [Email: Subject contains [Issue]] then.. (Which contains AND  ...What we want is OR)

    Can anybody please provide resolution for this?

    Monday, June 8, 2009 12:23 PM

Answers

  • No good answers on this one I'm afraid. I don't think there is even a codeplex add-on to provide the functionality.

    As previously suggested an If 'New' Then action Else If 'Test' Then action structure will do the job OR if there is no chance of the subject containing both you could put two If statements after each other or have two workflows.

    Leon Tribe
    Want to hear me talk about all things CRM? Check out my blog

    Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/
    • Proposed as answer by Leon TribeMVP Monday, June 8, 2009 8:19 PM
    • Marked as answer by Mayank Pujara Wednesday, June 10, 2009 8:29 AM
    Monday, June 8, 2009 8:19 PM

All replies

  • Hi Mayank,

    May be you could first add a step for checking "subject contains new"  followed by another step for performing action and
    then you could again select your first checking subject step and could add a conditional branch step for checking "subject contains test"  !

    Regards,
    Nishant Rana

    http://nishantrana.wordpress.com
    Monday, June 8, 2009 12:39 PM
  • No good answers on this one I'm afraid. I don't think there is even a codeplex add-on to provide the functionality.

    As previously suggested an If 'New' Then action Else If 'Test' Then action structure will do the job OR if there is no chance of the subject containing both you could put two If statements after each other or have two workflows.

    Leon Tribe
    Want to hear me talk about all things CRM? Check out my blog

    Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/
    • Proposed as answer by Leon TribeMVP Monday, June 8, 2009 8:19 PM
    • Marked as answer by Mayank Pujara Wednesday, June 10, 2009 8:29 AM
    Monday, June 8, 2009 8:19 PM
  • No good answers on this one I'm afraid. I don't think there is even a codeplex add-on to provide the functionality.

    As previously suggested an If 'New' Then action Else If 'Test' Then action structure will do the job OR if there is no chance of the subject containing both you could put two If statements after each other or have two workflows.

    Leon Tribe
    Want to hear me talk about all things CRM? Check out my blog

    Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/
    You are stuck with IF statements via the GUI :(.  I'm not sure if loading it in VS2008 would allow OR, but I would bet no.

    Withers
    Monday, June 8, 2009 10:43 PM
  • I have to check around 10 conditions similiar to one mentioned in the example, I am currently doing if..else and it is really pain full becuase it takes around 3 hours to create one simple workflow.

    if editor support the OR condition then my workflow would become only 3 lines (rather than 30 lines right now).

    So this one surely requires to be done in next CRM Release! I have given by feedback to MS regarding this at https://connect.microsoft.com/dynamics/feedback/ViewFeedback.aspx?FeedbackID=465863

    can you please support this enhancement?
    Wednesday, June 10, 2009 8:29 AM
  • Hi Mayank,

    One more that is possible is that you could write a custom workflow activity for the same, where you could have your subject as an input parameter and there you could check your conditions  (and an output parameter for result as well)  and then that  follow with your action step based on the result !

    Regards,
    Nishant Rana


    http://nishantrana.wordpress.com
    Wednesday, June 10, 2009 9:05 AM
  • Welcome to CRM, Wait till someone asks you to put an if in the middle of a workflow.  Happy re-creating all the same steps.
    Withers
    Thursday, June 11, 2009 9:06 PM