2

For example, I want a workflow to send when First name equals "John" AND when the last name equals "Smith." But I don't want the workflow to send when the workflow is for someone named John Doe or Tom Smith.

Can I just use two 'if' conditions like this? Multiple 'If's

For SharePoint 2010.

1
  • Yes, that should work. Commented Sep 28, 2015 at 17:10

3 Answers 3

1

You can, but you won't always want to. For simplification, clarity, and performance, you'd want to consider combining multiple if statements into one by typing multiple "if" steps into the same if statement. In your case:

enter image description here

2
  • Thank you. How do you add an "and"? Commented Sep 29, 2015 at 19:09
  • 1
    Do you prefer to type your commands or right click and select from the list? Put your cursor below the current IF statement but inside the same rectangle (in my screenshot, you would put your cursor where my "and Current Item..." step is). Insert a second IF statement the same way you inserted the first one, i.e., Start typing "if current" or right click and select "If current item field equals value." Click on the "and" to toggle and/or. Commented Sep 29, 2015 at 19:43
0

That will work like you want. If it passes the first condition, FN equals John, it will move to the next condition. It will only then send the email if the LN is Smith. It will not send an email to John Doe (fails LN check) or Tom Smith (fails FN check).

1
  • Perfect. I'll let you know how it goes. Commented Sep 28, 2015 at 17:23
0

You can also add a condition below an existing one. Right click underneath the first statement, and you will get the option to add another condition, where you can use an "and" or "or" statement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.