cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
emh
Level 8

An error occurred on the server. Server Response: Not a valid connector Error response.

Hello,

 

We just started receiving this error message when doing a submitform. This error only occurs in the PRODUCTION environment and not the TEST or DEV environment. The sql connector for this PowerApps module is also used in other  PRODUCTION environment modules without error. Further, this module works fine in both the TEST and DEV environments.  All have been working fine for almost a year now.

 

The underlying data is Azure sql. There are two screens. First the user inputs an EmployeeID and if found, a gallery of records is displayed on this first screen. Then the user selects on of the records and the record is then displayed in a form on the second screen. After the user makes changes, they select the UPDATE button which uses SUBMITFORM to enable the change. The error occurs on the SUBMITFORM. 

 

Is there a limit to the number of fields on a form? Any direction is greatly appreciated.

 

Thank you.

2 REPLIES 2
Community Support Team
Community Support Team

Re: An error occurred on the server. Server Response: Not a valid connector Error response.

Hi @emh ,

Could you please share more details about the error message within your app?

Have you set Not Null property for some fields in your Azure SQL Table?

 

I have made a test on my side, and don't have the issue that you mentioned. Please check if you have set Not Null property for some fields in your Azure SQL Table, if true, please make sure you have provided valid values for these fields in your Edit form.

 

In addition, please also consider remove the connection from your app, then re-create a new connection to your Azure SQL Table, then try your app again, check if the issue is solved.

 

If the issue still exists with the SubmitForm() function, as an alternative solution, you could consider submit your form data using Patch function instead of SubmitForm() function. Please set the OnSelect property of the "Submit" button to following:

If(
   EditForm1.Mode = FormMode.New,
   Patch(                                  /* <-- Add new record */
            'YourSQLTable',
             Defaults('YourSQLTable'),
             {
               Column1: DataCardValue1.Text,
               Column2: DataCardValue2.Text,
               ...
             }
   ),
  Patch(                                   /* <-- Modify existing record */
            'YourSQLTable',
             BrowseGallery1.Selected,
             {
               Column1: DataCardValue1.Text,
               Column2: DataCardValue2.Text,
               ...
             }
   )
);
If(
   IsEmpty(Errors('YourSQLTable')),
   Back()
)

Note: The DataCardValue1, DataCardVlaue2, ... represents the Data Card Value boxes within your Edit form.

Please take a try with above solution, then check if the issue is solved.

 

More details about the Patch function, please check the following article:

Patch function

 

Bets regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
emh
Level 8

Re: An error occurred on the server. Server Response: Not a valid connector Error response.

Hello,

 

I appreciate your attention. In response:

 

None of the editable fields are set to NOT NULL. Plus the editable fields all contain appropriate values. The problem persists in the form's EDIT mode, I have not tested NEW mode yet. In fact, this app works fine in our DEV and TEST environments.  Only when it is imported to the PRODUCTION environment do I experience issues. I have rebuilt the connector and also removed the connector and built a new one. Still the problem persists. I have resisted using Patch because there are 43 datacards on the form. If that is the only option, then I will try. 

 

Can you think of any reasons why the app works in other environment but not the PRODUCTION environment?

 

Thank you,

Eric

 

Helpful resources

Announcements
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

Top Kudoed Authors
Users Online
Currently online: 147 members 3,133 guests
Please welcome our newest community members: