Saturday, 5 June 2021

Microsoft Flow: query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold

You'll get this error when you are using Microsoft Flow and if you want to get an item from SharePoint List which has more than 12 lookup columns.

Error:

The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold.

clientRequestId: 45c548ed-6957-45ff-ae6b-2d19887a92ad
serviceRequestId: 45c548ed-6957-45ff-ae6b-2d19887a92ad

Why do we get this error?

The error is causing with SQL Server. Each lookup requires a join with another table within SQL Server so Microsoft decided to maximize the number of lookups that can be made to avoid performance degradation.

Initially the limit was set to 8, but since the SharePoint 2013 Post June 2013 CU update, Microsoft has increased this limit to 12.

Columns that are defined as lookup columns?

Below are the column types are defined as lookup columns:

  • Standard Lookup columns
  • Managed metadata columns
  • People and groups columns (These also include the Created by and Modified by fields, see below!)
  • Workflow Status columns
OOTB Lookup columns:
  • Created by
  • Modified by
  • Name (linked to Document)
  • Link (Edit to edit item)
  • Name (linked to Document with edit menu)
  • Type (icon linked to document)
The solution is to create a view in your SharePoint list that has a maximum of 11 lookup columns. Then in Power Automate you add that view and that resolves the issue.

Ref links:

No comments:

Post a Comment