Hello. My save icon is throwing a bad gateway error. I have checked the related posts here to no avail.
In my app, the same data entry form is used for a new record and to modify an existing record. I use a global variable, formtype to store whether the form should be in new or edit mode and tie the form's default mode to this variable. Also the form is split across two screens: Part 1 and Part 2. The underlying data source is a SharePoint list. I pass the data from the gallery (on a different screen yet) to the form via a global variable selecteditem=galleryname.selected. The form's item property is set to this variable selecteditem.
When I create a new record everything works fine. However, once I navigate away from the data entry screen for the new record, i.e. to the gallery with this new record and then select that same record for editing, make the changes and click save, I get the bad gateway error. I don't get an immediate notification of the bad gateway error, but after clicking save, the changed fields revert to their previous value (indicating that the save didn't work). I checked the SharePoint list and the changes were not saved. Then when back in edit mode of the app, I see the red x next to the save icon that says "An error occurred on the server. Server response 'In Out Clearance failed: Bad Gateway".
So I rebuilt the form and everything seemed fine until I tried editing a record. Then I replaced the submit form function with a Patch function and again everything seemed fine until I edited a record. Oddly, Part 2 of the form works just fine with the submit form function. Part 1 of the form has complex data types including people pickers but they work fine for a new record.
I really don't think it is a server problem as the error would indicate since it works for a new record and saving Part 2 of the form works. I think it is code related but can't find the culprit.
Any suggestions are greatly appreciated.
Mark