cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

Server Response: A value must be provided for item

Hi all,
I'm getting this error when trying to submit a form to a sql server.

The form is a 'New' form and is called with a Newform(form1), every value in the table has an assigned text input to it.

The 'Item' value for the form is left blank as I have been told a 'New form' - that just writes new values - doesn't need an Item property.

So why do I get this error?

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Server Response: A value must be provided for item

Hi @Connor_Taylor,

Yes. you are right. Please check if you have defined a PRIMARY KEY within your SQL table.

If you don't define a PRIMARY KEY within your SQL Table, when you generate an app from your SQL table, it would not generate the "Edit" screen.

More details about the limits of SQL Server connector, please check the following artcile:

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

 

Best regards,

Kris

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.
4 REPLIES 4
Community Support Team
Community Support Team

Re: Server Response: A value must be provided for item

Hi @Connor_Taylor,

Could you please share a bit more about your scenario?

I have made a test on my side (leave blank within Item property of Edit form), and don't have the issue that you mentioned.

Please check if you have displayed all required/mandatory fields within your Edit form. Also please check if you have provided valid/proper values for these required/mandatory fields of your SQL table.

The user @Connor_Taylor has faced same issue with you, please check the response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/Submitting-a-form-for-a-new-record-Item-value...

Please take a try to set the DefaultMode property of the Edit form control to following:

FormMode.New

then check if the issue is solved.

Please also take a try to re-create your app, and then check if the issue still exists. 

In addition, you could also consider submit your form data into your SQL table using Patch function instead of SubmitForm function. The standard format of Patch function as below:

Patch(
  'YourSQLTable',
   Defaults('YourSQLTable'),
   {
    Column1: DataCardValue1.Text,
    Column2: DataCardValue2.Text,
    Column3: DataCardValue3.Text,
    ...
    Column6: DataCardValue6.Selected.Value,
    ...
   }
)

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

Patch function

 

Best regards,

Kris

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.

Re: Server Response: A value must be provided for item

Thanks for the help @v-xida-msft

I tried to remake the app this time with the "start from data" template and instead of 3 screens, I only get 2 screens the "Edit" screen is missing, could this be an indication of the problem I am facing?

 

Thanks

Re: Server Response: A value must be provided for item

Seeing tutorials online, could it be that my table doesnt have a primary key that is auto-generated? Is there anyway to work around this

Community Support Team
Community Support Team

Re: Server Response: A value must be provided for item

Hi @Connor_Taylor,

Yes. you are right. Please check if you have defined a PRIMARY KEY within your SQL table.

If you don't define a PRIMARY KEY within your SQL Table, when you generate an app from your SQL table, it would not generate the "Edit" screen.

More details about the limits of SQL Server connector, please check the following artcile:

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

 

Best regards,

Kris

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.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

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

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 201 members 3,816 guests
Please welcome our newest community members: