0
votes

I need to update List A from a form submitted in List B, where B.username = A.username. I am used to using SharePoint 2010 Enterprise and some of the advanced tools that go with that, but right now I am stuck on 2010 Foundation.

I don't know if I'm just having a brain pfft or something, but I can't make it work. Is this a limitation of Foundation? In the workflow editor in 2010 Designer, I can say update List A with a value from List B, but somehow not submit a where clause. Can anyone help?

What I'm actually trying to do is have a list of all users on the network and the form from List B just updates the "Accept" or "Decline" by the user's name in the first list.

Any help would be appreciated.

1

1 Answers

0
votes

Assuming this is one-to-one relationship - that is, the WF triggered on the item in List B would only ever update one item in List A - when you configure your "Update List Item" action within the WF and select a "List" other than 'Current Item', a section will appear at the bottom called "Find the List Item" that will allow you to define how the WF will find the item in List A to update.

See here: enter image description here

Bear in mind though, when using SharePoint Designer, you're limited to one-to-one relationships, and the only 'where' clause you can apply is an equals filter whereby some value you have (be it from the current item, a WF variable, an initiation parameter or a static value) is compared via equals operator to a field in the remote List (i.e. your List A). Should you define a clause that could result in more than one match - again, your WF on List B cannot trigger an update to 'n' items in List A - you will see this warning: enter image description here

Caveat: all these conditions only apply when creating a WF via SPD; if you have access to Visual Studio, you can use it to create & deploy workflows that do support updating multiple items in a remote list based on a single WF being triggered, querying the associated items through something other than an equals, etc.