Workflow terminates on Query List action when list exceeds 5000 items

  • 26 March 2021
  • 0 replies
  • 455 views

Userlevel 5
Badge +19

ISSUE

Workflow suspends when using the "Query List" or "Office 365 Query List" actions to query a list that contains more than 5000 items.
 

ERROR CODE

The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator. 
 
9788i648BBC92873E155F.png

 

RESOLUTION

In an effort to increase the performance of the query, create an index on the list column on which the filter is being applied.

 

1. Identify the column which the query is being filtered on

 

9786i142EADC88CAEF927.png
 

2. On the list which is to be queried, navigate to List Settings > Indexed Columns (located under the list of all list columns) > Create a new index.

 

3. Select the previously identified column in the drop down menu for 'Primary column for this index'. Click 'Create'.

 

9787i67BE01A8F8E42B41.png

 

3. Execute your workflow and check the results in the workflow history.

Note: The result below is from a 'Log in History List' action capturing a variable that contains the number of items returned from the query. This will not appear by default.

 

9784i1B6755E8C8B6E684.png

ADDITIONAL INFORMATION

This issue occurs because SharePoint Online uses the Large List Resource Throttling feature. By default, the list view threshold is configured at 5,000 items. When the defined item limit in a list is exceeded, the message is displayed.
 

0 replies

Be the first to reply!

Reply