cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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 Smiley Sad

 

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"

 

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"

 

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 402 members 5,014 guests
Please welcome our newest community members: