cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
M_DONNAY
Level: Powered On

Error: Bad gateway - number of lookup columns it contains exceeds the lookup column threshold

 

 

I have a very simple flow that should send on a regular basis notifications to record owners  in a sharepoint list. List with a lot of columns but  few rows ...

 

I'm getting the error:

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

 

Knowing that I can not delete columns. Is there another way to get the flow working ?

 

Thanks

 

4 REPLIES 4
Community Support Team
Community Support Team

Re: Error: Bad gateway - number of lookup columns it contains exceeds the lookup column threshold

Hi @M_DONNAY,

 

How is your flow created? Are you using Filter query in your flow?


Per my research, it seems that by default the limit is 8 lookups per list.


Please check this thread at here:
https://powerusers.microsoft.com/t5/Flow-Ideas/SharePoint-Lists-add-ability-to-select-columns-and-li...

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
M_DONNAY
Level: Powered On

Re: Error: Bad gateway - number of lookup columns it contains exceeds the lookup column threshold

Hi @v-yamao-msft

 

I have reduced the flow to a simple Recurrence->Get items

 

I got the error

  "status"502,
  "message""The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold enforced by the administrator.\r\nclientRequestId: ea84c772-f9ef-4067-9cfd-7b2a3db30177",
  "source""https://YYYY.sharepoint.com/teams/XXXXXXX/_api/SP.APIHubConnector.GetListItems(listName='5a9d976f-dae9-4f25-b7ef-b239e3e8072e',queryOptions=@q)?@q='%2524filter%3dProgram_x0020_Status%2520eq%2520%2527Ongoing%2527%2520%2520or%2520Program_x0020_Status%2520eq%2520%2527On-Going%2527'",

 

There is a filter on one status column "Program Status"

 

Note that the similar REST query on the same list doesn't returns error:

https://YYYY.sharepoint.com/teams/XXXXXXXX/_api/lists(GUID'5a9d976f-dae9-4f25-b7ef-b239e3e8072e')/it...

Jitu
Level: Power Up

Re: Error: Bad gateway - number of lookup columns it contains exceeds the lookup column threshold

I have created simple flow , When item is created in list send me the email, But when item is created in the list, flow doesnt get triggerd , after digging i got error like "The query cannot be completed because the number of lookup columns it contains exceeds the lookup column "

 

 

 

{
  "error": {
    "code": 502,
    "source": "msmanaged-na.azure-apim.net",
    "clientRequestId": "07afc03e-9ca3-4bff-94a7-02e7a5855b2e",
    "message": "BadGateway",
    "innerError": {
      "status": 502,
      "message": "The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold enforced by the administrator.\r\nclientRequestId: ,
      "source": "../_api/SP.APIHubConnector.GetNewListItems",
      "errors": [
        "-2147024749",
        "Microsoft.SharePoint.SPQueryThrottledException"
      ]
    }
  }

M_DONNAY
Level: Powered On

Re: Error: Bad gateway - number of lookup columns it contains exceeds the lookup column threshold

Would be nice if the sharepoint get items allows to select only the fields required in the flow ... maybe a way to get rid of this error in the future ?

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (5,818)