cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
itghcitrus
Helper I
Helper I

Server response: A value must be provided for item

new form, trying to publish as insert.
publishing to sql server.
data is stored in a view of a synonym connecting to a different database.
the user is able to perform the insert via dbms, but receive this error in app.
Any suggestions?
1 ACCEPTED SOLUTION

Accepted Solutions

This miraculously works now, not sure who fixed what, I did not change anything.

It writes back to the new table in the db

View solution in original post

6 REPLIES 6
mdevaney
Super User III
Super User III

@itghcitrus 

Suggest you provide a screenshot of the full error message and any code you are using to insert the new rows of data.

v-xida-msft
Community Support
Community Support

Hi @itghcitrus ,

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

Do you submit data back to your original SQL Table or SQL View?

How do you submit your data? Using SubmitForm function or Patch function?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Firstly, please check if you have defined proper Primary Key in your SQL Table.

There are some known limits within SQL Connector in PowerApps, please check the following article:

https://docs.microsoft.com/en-us/connectors/sql/#known-issues-and-limitations

 

Also please check if you have provided proper value for these Required fields in your SQL Table. When you write data back to your SQL Table, please use SQL Table as data source rather than SQL View. Currently, the SQL View is Read Only in PowerApps app. If you use Patch function to submit form data, the standard formula format as below:

Patch(
      '[dbo].[SQL Table]',
      Defaults('[dbo].[SQL Table]'),
      {                                    // must specify all Required fields within '{}' part
         Cokumn1: "xxxx",
         Column2: "xxxx",
         ...
      }
)

 

Best 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.

i submit back to sql view of synonym for table in a different db

i use SubmitForm

Hi @itghcitrus ,

Do you submit data back to SQL View directly?

Do you bind your Edit form to SQL View, and save data back to SQL View directly?

 

If you submit data back to SQL View directly, I think there is something wrong with this operation. Currently, SQL View is Read-Only in canvas app, which could not be use as underlying data source to save data.

 

Please connect your Edit form to your original SQL Table, then try the SubmitForm function again.

Note: The Edit form could only connected to single one data source once time.

 

Best 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.

i deleted the screen, created a new screen with a form configured for New, each field in the form is configured to Edit (except the Id field as this is the primary key), created a table in the db i am using with powerapps (which is a copy of the table from the other db), same error.
Table has a primary key, along with 5 text fields and 1 numeric field. SubmitForm button returns same error

This miraculously works now, not sure who fixed what, I did not change anything.

It writes back to the new table in the db

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,024)