Crow Canyon Software Forum
Workflow Sometimes Fails to Update Master Record Status When Details are Completed Concurrently
Quote from pf-amalin on April 14, 2025, 5:46 pmI have a master list that tracks the status of an activity, with a secondary list tracking the detailed steps for each activity in the master list. The two lists are linked via a lookup field in the detail list called [Original Request]. Each master record can have one or more associated detail records. Once all the detail records are marked as complete, I would like the status of the corresponding master record to be updated to "IT."
To achieve this, I created a workflow with the following logic:
When a detail record is completed, a history record is created to log the progress.
The workflow increments the [RequestsCompleted] column on the master record.
If [RequestsCompleted] is greater than or equal to the total number of detail records, the status on the master record is updated to "IT."
This workflow functions as expected when there is a delay between the completion of detail records. However, when multiple detail records are approved within a few seconds of each other, the [RequestsCompleted] column is not always updated correctly, causing the count to be inaccurate. As a result, the master record status is not updated to "IT."
The approver uses a grid view to check boxes to approve each detail, which is processed rapidly. While the history log accurately shows each individual approval, the count on the master record is not always correct.
Given that concurrent updates are a common operation in database systems, I assumed SharePoint would handle this automatically. However, I am experiencing issues with this synchronization. Does anyone know what I might be missing in the workflow setup?
Additionally, I attempted to use a "Query List" action to count the uncompleted details by retrieving all records from the detail list with the same [Original Request] value. Unfortunately, I have been unable to get this to work, likely due to incorrect syntax on my part.
I’m looking for guidance on how to ensure that the master record status is updated automatically once all associated detail records are approved.
Any help or advice would be welcome!
I have a master list that tracks the status of an activity, with a secondary list tracking the detailed steps for each activity in the master list. The two lists are linked via a lookup field in the detail list called [Original Request]. Each master record can have one or more associated detail records. Once all the detail records are marked as complete, I would like the status of the corresponding master record to be updated to "IT."
To achieve this, I created a workflow with the following logic:
-
When a detail record is completed, a history record is created to log the progress.
-
The workflow increments the [RequestsCompleted] column on the master record.
-
If [RequestsCompleted] is greater than or equal to the total number of detail records, the status on the master record is updated to "IT."
This workflow functions as expected when there is a delay between the completion of detail records. However, when multiple detail records are approved within a few seconds of each other, the [RequestsCompleted] column is not always updated correctly, causing the count to be inaccurate. As a result, the master record status is not updated to "IT."
The approver uses a grid view to check boxes to approve each detail, which is processed rapidly. While the history log accurately shows each individual approval, the count on the master record is not always correct.
Given that concurrent updates are a common operation in database systems, I assumed SharePoint would handle this automatically. However, I am experiencing issues with this synchronization. Does anyone know what I might be missing in the workflow setup?
Additionally, I attempted to use a "Query List" action to count the uncompleted details by retrieving all records from the detail list with the same [Original Request] value. Unfortunately, I have been unable to get this to work, likely due to incorrect syntax on my part.
I’m looking for guidance on how to ensure that the master record status is updated automatically once all associated detail records are approved.
Any help or advice would be welcome!
Uploaded files:Quote from supportTeam on April 16, 2025, 5:06 pmHi Art,
We believe you have configured a workflow on Detail list item updated to ‘Approved’ in your example above and updating the count in Master list item.
We do not need to maintain the counts in this case. We can directly use a query list action to get the count of open associated items (Details) of the same Master. If no items are found in the query list action, then we can use an update item action to complete the Master list item.
We can configure the Query List action to retrieve tasks with the status set to 'Completed' using the ‘Continue workflow execution’ option set to ‘Only if no item found’. Refer to the article below for more details on how to set this up.
Hi Art,
We believe you have configured a workflow on Detail list item updated to ‘Approved’ in your example above and updating the count in Master list item.
We do not need to maintain the counts in this case. We can directly use a query list action to get the count of open associated items (Details) of the same Master. If no items are found in the query list action, then we can use an update item action to complete the Master list item.
We can configure the Query List action to retrieve tasks with the status set to 'Completed' using the ‘Continue workflow execution’ option set to ‘Only if no item found’. Refer to the article below for more details on how to set this up.
Uploaded files: