Method Community

 

Nested Conditional Statements in Actions?

Last post 04-28-2012 12:29 PM by CarolOliver. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 04-25-2012 9:53 PM

    Nested Conditional Statements in Actions?

    Greetings.

    I need to create an Action to occur based on the value selected in a dropdown field.  If the selection is "Closed", then I need the Action to do one thing and if the selection is "Won", I need it to do something else.

    Bottom line:  How can I nest Conditional Statements together?  (Like an "if, then, else" statement).

    Is there an example in Method CRM to which I can refer?

    Many thanks,

    Carol

  • 04-25-2012 10:07 PM In reply to

    Re: Nested Conditional Statements in Actions?

    It's super easy.  But no If...Then..Elseif....Else.....it's just If...Then.

     

    Conditional Start: If Month equals April then

        Conditional Start: If Today equals Monday Then

             Show Message "Sorry, to hear you're having a bad day"

        Conditional End

     

        Conditional Start: If Today is not equal to Monday Then

             Show Message "Hope you're having a great day. At least it isn't Monday.!"

        Conditional End

     

    Conditional End

  • 04-26-2012 9:17 AM In reply to

    Re: Nested Conditional Statements in Actions?

    Thank you!

    Carol

  • 04-27-2012 12:26 PM In reply to

    Re: Nested Conditional Statements in Actions?

    What if you have more than one condition, and no conditional operators in Method...

    An issue I had recently

    if condition1...do something1.
    if condition1 and condition2...do something2.
    if condition1 and condition3...do something3.
    if condition1 and condition2 and condition3...do something4.

    So I nested the If statements, and played around until I got the behaviors I needed.
    Is there a better solution for a case like this - for multiple conditions?
    I hope I have explained clearly enough.
    Thanks,
    Garrett

  • 04-27-2012 12:51 PM In reply to

    Re: Nested Conditional Statements in Actions?

    Garrett,

    Great question!  I'm looking forward to the answer.  

    I learned a lot from examining the Actions on the "Save" button in CRM New Opportunities screen.  But it didn't have anything like your multiple conditions...

    I wish there was some way to print a report showing all the Actions on a button (and setup detail for them.)  I've resorted to screen prints, modifying in Paint and copying to Word to create documentation of something I've done but it is hardly a satisfactory solution.  Also, ALT-PRTSC does not grab just the active window in Method like it usually does in other products; it grabs the entire screen - hence the necessity for the clean-up task in Paint.

    Carol

     

  • 04-27-2012 1:10 PM In reply to

    Re: Nested Conditional Statements in Actions?

    Carol - right click on the designer screen and choose Show Summary.

    Happy friday.

    Paul

  • 04-27-2012 1:29 PM In reply to

    Re: Nested Conditional Statements in Actions?

    Paul,

    I tried that but it isn't enough information.  I want it ALL!  Isn't that just like an CPA?  "Show us ALL your stuff..."

    Carol Big Smile

  • 04-27-2012 1:34 PM In reply to

    Re: Nested Conditional Statements in Actions?

    Ahh - gotcha.  Okay.....I know what you want.  I also know what we are working on.....and you've going to have to hold tight for a while unfortuantely.  But something is coming later this year that will blow off the roof in this regard and much more....

    Paul

  • 04-28-2012 12:29 PM In reply to

    Re: Nested Conditional Statements in Actions?

    I eagerly look forward to it.

    BTW, I am a HUGE Method fan already and I've only been working with it since early April.  Love it, Love it!!!!

    Can you recommend a good book on VB that will ramp me up on the scripting?

    Thanks.

    Carol

Page 1 of 1 (9 items)