0

I have a workflow attached to a task list that sends out an email to the assignee to asking them to fill out and submit a form. The workflow sends daily reminders (I followed this post) until the task is listed as complete. I have a second workflow that runs when the user submits the form and starts an approval process. I would like this workflow to also update the task so it is listed as complete before the approval process gets kicked off.

The trouble I've come across is the inability to include multiple criteria when trying to find the list item to update. Any ideas?

2
  • what do you mean by "inability to include multiple criteria"? Jan 6, 2012 at 20:34
  • In the Update List Item dialog box, the find the list item section at the bottom has a drop down box for the field and a text box for the value. The insert function only lets me choose one data source and field to use at criteria. I can look up a task assigned to userA and update it from the second workflow but if he has more than one tasks it will settle on the first one. Is that a little clearer?
    – samauger
    Jan 6, 2012 at 20:43

3 Answers 3

1

We usually do lookups like this by setting a field we call originalItemID; which we hide in all of the forms using PowerShell and not via customizing the form. It's a little more flexible to hide it in that way.

Let's say we have 3 lists (one library, a custom list, and a task list). A document is created in the Lib-A which creates a custom item in List-B that people use to marshal the item through some processes. At certain points WFs in List-B create task Items in List-C which have fields that point to the ID of both the document and the item in List-A acting like foreign keys in a database. Additionally tasks created in List-C could change a field in List-B called currentTaskId so that WFs in List-B could find the current item in List-C. There might be a better way, but for SPD WFs this is the best way we have found to manage one-to-many relationships. I hope that helps with what your problem.

0

We ended up getting Nintex Workflow 2010 and using the query list action to get the correct ID of the to-do item and updating with that. Thanks for your input!

0

You could create a calculated column on the list that concatenates the multiple lookup values. In the Designer workflow, create a variable that will match the lookup value, then use it to lookup the intended item. Of course, you might want to hide this column since it doesn't have any use to the end-user.

Example:

You want to find an item based on Location and Year. Create a calculated column called "LookupValue" with a formula of =CONCATENATE([Location],"-",[Year]). Calculated values would look like "Paris-2014" or "New York-2013". In the SPD workflow, build a variable of the corresponding Location and Year you want to look up. Use this variable to lookup the item from the list.

1
  • Does this actually work? In SP2013 I get an error that it can't use column with type Calculated in the lookup filter.
    – Matt
    Mar 3, 2015 at 18:42

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.