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

kem104 165 Reputation points
2024-04-14T03:24:50.7366667+00:00

Can anyone help me to resolve the error while trying to retrieve data from the network: The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold.

I counted the look up column and person group columns in one of my document library which is 12 and I guess look up columns limit is 12 as well. I also removed some columns from view as well. the whole system was working before and suddenly the error comes up. the perticular document library is connected with Power App and Power Automate where I get above error and could not find the solution as it was working fine before.

one more thing , few days ago I updated the Sharepoint online site url and and I guess it was working fine there was couple of error in Power App database connectivity and I fixed all of them. My question is because of this reason I am getting this error or it is actually a look up column issue.

User's image

your response will be much appreciated.

Thank you in advance

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,999 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,154 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
613 questions
{count} votes

Accepted answer
  1. Q&A Assist
    2024-04-14T03:24:50.7533333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error message "The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold" occurs when the number of lookup columns in a SharePoint list exceeds the threshold limit. This limit is 12 for SharePoint Online and SharePoint Server 2019. Since you have counted the lookup columns in your document library and found that there are 12, it is likely that this is the cause of the error.

    To resolve this issue, you can either remove some of the lookup columns or change the way you are querying the data to use fewer lookup columns. Another option is to use indexed columns and filtering to keep the view size for the list to 5,000 items or less. For more information about how to create a filtered view that has a column index, go to Manage large lists and libraries in SharePoint.

    It is possible that the recent update to the SharePoint Online site URL could have caused this issue, but it is more likely that the issue is related to the number of lookup columns in the document library.


    References:


1 additional answer

Sort by: Most helpful
  1. Emily Du-MSFT 48,646 Reputation points Microsoft Vendor
    2024-04-16T09:50:37.8133333+00:00

    The threshold limit of 12 lookup columns includes lookup columns and person columns.

    Site URL will not affect the limitation of 12 lookup columns.

    It may be caused by some hidden lookup columns, such columns about flows and workflows.

    And when it is closer to the limitation, data query is more likely to report errors. Please reduce lookup columns in the view.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.