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

502 Bad Gateway on SharePoint form

Hi all,

 

Since a couple of days (3-4 days), I'm having trouble getting a certain PowerApps SharePoint form to work.

It's giving me an error on the datasource itself, being "An error occurred on the server":

Also, if I open the developers toolbar in IE or chrome I get a lot of 502 bad gateway errors, all pointing to https://europe-001.azure-apim.net/apim/sharepointonline/shared-sharepointonl-***.
On other lists, I don't have this problem.

 

The error on the people field 'Leidinggevende' was resolved, because apparently the people field has a new control incl. picture etc. So I just removed the former control and readded a new datacard.

This however didn't resolve the form error 😞

 

So far I've:

  • Contacted Microsoft via service request: no response in 2 days (usually someone answers in a couple of hours, now, I don't know what's going on)
  • Saved the list on which the form is based as a template and recreated it in another tenant => same problem here
  • Created a new custom list and edited the SharePoint form in PowerApps: ok
  • Created a new custom list, added similar types of fields (date, multiline, choice, people) to the list and edited the SharePoint form in PowerApps: ok (=so no problem with the types of fields)
  • Restored a version of the form from a couple of days ago => doesn't work
  • Created a standalone PowerApps app, based on this list: same problem
  • Added a new datasource to the form, reconnected the SharePoint Integration-component to the new datasource => same problem

Does anyone else have this problem?

 

1 ACCEPTED SOLUTION

Accepted Solutions
NilsVB
Level: Powered On

Re: 502 Bad Gateway on SharePoint form

This issue was resolved by Microsoft support and the underlying problem was we hit the throttling limit of PowerApps, although it wasn't that obvious!

The problem was that, apart from a couple of listcolumns we also had 9 workflowstatus columns on that list. Those were coming from SharePoint Designer workflows.

As you may or may not know: every time you publish a new version of a workflow, and you have items running a previous version of that workflow, SharePoint adds a new workflowstatus column for the new version.

These fields also count towards the throttling limit apparently! Same goes for people fields.

 

So in our case, we had 9 workflowstatus columns, with 1 extra column for a new version, 1 additional people field and the default 2 people fields (=created by and modified by). This caused the PowerApps form to cross the 12 field limit on 'special lookup' columns threshold.

By deleting the duplicate workflowstatus field, the form started working again!

 

For anyone wanting to remove those pesky workflowstatus fields, here is the PowerShell code to do so:

Import-Module SharePointPnPPowerShellOnline -DisableNameChecking;
$secpasswd = ConvertTo-SecureString "password" -AsPlainText -Force;
$cred = New-Object System.Management.Automation.PSCredential ("username", $secpasswd);

$company = "tenantName"
$url = "https://$company.sharepoint.com/sites/SiteName";

# PnP
Connect-PnPOnline -Url $url -Credentials $cred;

Set-PnPField -Identity "MyFieldTitle" -List  "ListName" -Values @{Hidden=$false;ReadOnlyField=$false}
Remove-PnPField -Identity "MyFieldTitle" -List  "ListName"

 

View solution in original post

1 REPLY 1
NilsVB
Level: Powered On

Re: 502 Bad Gateway on SharePoint form

This issue was resolved by Microsoft support and the underlying problem was we hit the throttling limit of PowerApps, although it wasn't that obvious!

The problem was that, apart from a couple of listcolumns we also had 9 workflowstatus columns on that list. Those were coming from SharePoint Designer workflows.

As you may or may not know: every time you publish a new version of a workflow, and you have items running a previous version of that workflow, SharePoint adds a new workflowstatus column for the new version.

These fields also count towards the throttling limit apparently! Same goes for people fields.

 

So in our case, we had 9 workflowstatus columns, with 1 extra column for a new version, 1 additional people field and the default 2 people fields (=created by and modified by). This caused the PowerApps form to cross the 12 field limit on 'special lookup' columns threshold.

By deleting the duplicate workflowstatus field, the form started working again!

 

For anyone wanting to remove those pesky workflowstatus fields, here is the PowerShell code to do so:

Import-Module SharePointPnPPowerShellOnline -DisableNameChecking;
$secpasswd = ConvertTo-SecureString "password" -AsPlainText -Force;
$cred = New-Object System.Management.Automation.PSCredential ("username", $secpasswd);

$company = "tenantName"
$url = "https://$company.sharepoint.com/sites/SiteName";

# PnP
Connect-PnPOnline -Url $url -Credentials $cred;

Set-PnPField -Identity "MyFieldTitle" -List  "ListName" -Values @{Hidden=$false;ReadOnlyField=$false}
Remove-PnPField -Identity "MyFieldTitle" -List  "ListName"

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (3,970)