none
Nested if else in sp designer

    Question

  • Hi

    How to use multiple if else conditions in sp designer.

    I have a case as below

    if currentItem:a equals "a"

    then update listitem

    else if

    if currentItem:a equals "b"

    update listitem

    if else

    if else

    ..

    is used to check about 7 values and update a list item accordingly.

    How to achieve this ?

    Regards

    Aashish

    Thursday, August 16, 2012 1:19 PM

Answers

All replies

  • You can design all these if-else statements in sharepoint designer.

    Thursday, August 16, 2012 1:38 PM
  • Create your first If condition.

    Click just under that If statement (an orange line will appear), then click the Condition button again, this will add your Else if.


    www.SharePointed.com



    Thursday, August 16, 2012 1:38 PM
  • I am trying to do this very thing with SharePoint designer. I have 3 (or more) possible categories.  If you choose RED, I want to update the INPUT field with the RedList.  If you select GREEN, I want the workflow to update the INPUT field with the GreenList.  I have tried multiple solutions (listed below), but in each case, only the first "if" statement (red in this case) works.  If I change the order (red, green, blue) the first IF statement in the list works fine, but the 2nd or 3rd will never work.  The INPUT field remains blank unless CATEGORY = the item in the 1st IF statement.

    What am I doing wrong here?  Thanks!!

    ----- 1st OPTION -----

    If Current Item: Category equals Red

       Set Contact to ContactList:RedList

    Else if Current Item: Category equals Green

       Set Contact to ContactList:GreenList

    Else if Current Item: Category equals Blue

       Set Contact to ContactList:BlueList

    ----- 2nd OPTION-----

    [Step 1]

    If Current Item: Category equals Red

       Set Contact to ContactList:RedList

    [Step 2]

    If Current Item: Category equals Green

       Set Contact to ContactList:GreenList

    [Step 3]

    If Current Item: Category equals Blue

       Set Contact to ContactList:BlueList

    Wednesday, November 20, 2013 7:17 AM
  • ----- 1st OPTION -----

    If Current Item: Category equals Red

       Set Contact to ContactList:RedList

    Are you trying to update Contact to an item in the RedList?


    www.SharePointed.com

    Wednesday, November 20, 2013 11:33 PM