1

I have two sharepoint lists. The first, LIST1, is a location listing with a unique plant code to each. The second list, LIST2, is a list of contacts with a column that ties back to that plant code. This list can have multiple contacts per plant. There is a separate item for each contact.

I want to be able to link these two lists together and edit them both at once. In the parent list, LIST1, I have a multi tab form and one tab is for the contacts. I want to enter a repeating table in which the user entering the data can add multiple contacts for that site which will add a new item to LIST2 for each contact they add. Then when they go in and edit it will pull all contacts that have the same plant code as the location they are editing.

Anyone have any ideas on how to do this?

1 Answer 1

0

Assuming you are working on a 2013/Online setup you could create a workflow, which would get all the items in LIST2 that matches the edited item in LIST1.

You can do this by using the REST API through the workflow and query LIST2. Then once they are found you can edit them as you see fit.

The actual endpoint you should be using to query LIST2 would this ("Guid1" is the guid of LIST2):

/_api/web/lists(guid'#1')/GetItems(query=@v1)?@v1=

You would need to append three variables to the above endpoint:

  • QueryStart: {"ViewXml":"<View><Query><Where>
  • Query: Use U2U to build your query and past it into this variable
  • QuenryEnd: </Where></Query></view>"}

It takes a bit of practice working with the REST API from the workflow as it is it's not very well documented. But I have a few links, that should get you started: https://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/ http://mysharepointinsight.blogspot.dk/2013/05/using-sharepoint-rest-services-from.html http://blog.bullseyeconsulting.com/archive/2014/08/31/conditionally-set-permissions-on-new-documents-in-sharepoint-2013-workflow.aspx

Your Answer

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

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