none
How Can I Update Multiple Records in a Secondary List based on a Primary List that Shares a Common Key

    Question

  • I have two lists (Primary and Secondary) they share a common key value (CommonKey). The Primary list has a status field (Status). When the status is changed on the Primary I need to update all of the records in the secondary file with the status form the primary file. Notes - the lists share a one to many relationship and the common key is unique in the primary list. 
    vendredi 11 mai 2018 16:45

Toutes les réponses

  • We should be able to:

    • Use a REST call to identify the related records based on the CommonKey
    • Count the results
    • Loop through the results and update the status

    Refer to this thread Identify Duplicates with REST which will take you through the first two steps in detail. All we have left is loop and update.

    Here is some test data for our example:

    We need to create a list workflow based on the Primary list that triggers when the list is changed.

    Here is the workflow:

    The first stage is almost exactly the same as in the previous thread where we counted the items:

    However, we have added an additional stage to loop through and update the status in the secondary file:

    This is the workflow log:

    And this is the result in our lists when the workflow runs on the first primary record:

    (More details later)

    vendredi 11 mai 2018 17:04
  • Was Wondering about the  More details later.. 
    jeudi 17 mai 2018 13:25