0

In SP2010, this workflow is triggered when I create or edit an item in a list.

If Current Item:ID equals (other list):ID
    Set Comments to Blah
Else
    Set Comments to Humbug

I'm sure that's not the right way to check if another list contains the same ID as the one I just created/edited, but my third test case had an empty string in Comments.

Test case 1: create, other list has no elements -->
- returned Humbug (expected Humbug)
Test case 2: create, other list has same number of elements -->
- returned Humbug (expected Humbug)
Test case 3: create, other list has one more element than triggering list -->
- returned empty string

My question is, how is this possible? If the workflow completed with no errors (which the workflow settings page seems to indicate since it does not have any workflows in progress and workflows halt on error), how is Comments still empty? Either 'Blah' or 'Humbug' should have been printed to the Comments column.

1 Answer 1

1

I think you need Else if approach. it provides a second set of conditions to match against

If Current Item:ID equals (other list):ID
    Set Comments to Blah
Else If Current Item Not equal (other List):id
    Set Comments to Humbug
Else
 return empty

Source

Lynda.com has very good tutorial on If then else conditions, i think you should watch this(its free may required registration) but will help you.

Using advanced conditions: IF, THEN, and ELSE

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.