cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thunter
Level: Powered On

Error Submitting Form to SQL

I have a Form, which is a new form, that I want to post the data to an SQL table as a new record but I keep getting the error "billto: The specified column is generated by the server and can't be specified" Any ideas how to fix? Thank you.

Highlighted
tchin-nin
Level 10

Re: Error Submitting Form to SQL

Hi @thunter

 

What I understand from the error message is that you have a column that will be autogenerated by SQL so you can't push data into it. Have you try submitting the form without this column to validate the error ?

 

Théo

thunter
Level: Powered On

Re: Error Submitting Form to SQL

Hi @tchin-nin

 

Thank you for your feedback. So in this form, I have fields that the user populates with data and some fields that are pulled from another table based on what the user inputs into the Trip # field. The SubmitForm when the button is clicked sends all the data to a different SQL table. Is it not possible to pull from one SQL table and submit it to another SQL table?  So if you look at my screenshot, the fields circled in red are auto-populated from an SQL table called orderheader based on what the user inputs into the Trip # field. The fields in red are filled in by the user. The Submit button then Submits the form to an SQL table called wynne_incidents.

tchin-nin
Level 10

Re: Error Submitting Form to SQL

Hi,

It is possible of course. 

From my point of view, the issue seems to be the Bill To column. 

On your wynne_incidents table, what is the column to store the bill to property ?

Can you just try patch some random data to this table see how it behaves ?

Patch(wynne_incendents,Defaults(wynne_incidents),{mandatory:"test", billto:"test"})

I just want to validate that pushing data into the billto column is possible. 

 

Théo


@thunter wrote:

Hi @tchin-nin

 

Thank you for your feedback. So in this form, I have fields that the user populates with data and some fields that are pulled from another table based on what the user inputs into the Trip # field. The SubmitForm when the button is clicked sends all the data to a different SQL table. Is it not possible to pull from one SQL table and submit it to another SQL table?  So if you look at my screenshot, the fields circled in red are auto-populated from an SQL table called orderheader based on what the user inputs into the Trip # field. The fields in red are filled in by the user. The Submit button then Submits the form to an SQL table called wynne_incidents.


 

thunter
Level: Powered On

Re: Error Submitting Form to SQL

@tchin-nin

 

The column name for the Bill To field is billto in the wynne_incidents table. 

 

I was able to push the test data to the billto column in wynne_incidents after following your instruction.

tchin-nin
Level 10

Re: Error Submitting Form to SQL

Ok,

Can you do it with a form and SubmitForm function, with test data against?

Like new screen / add form for wynne_incidents DataSource / 1 field only : billto (unless you have other mandatory field configured in your DB schema) / button SubmitForm (TestForm)

Try it by entering manual test data into billto textInput. 

 

I'm trying to determine where the error come from. 

 

Théo

thunter
Level: Powered On

Re: Error Submitting Form to SQL

Yes, this test worked with no errors.

tchin-nin
Level 10

Re: Error Submitting Form to SQL

Ok then the error must be due to the data your pushing.
The billto column is a text column right ? Nvarchar or varchar, something like this ?

Can you tell me how your filled this info in your form ? How the info from the other table are retrieved and what type of property do you put in the Bill to textInput particularly ?

Théo
thunter
Level: Powered On

Re: Error Submitting Form to SQL

billto column in wynne_incidents is varchar(15), the data that is pulled from orderheader SQL table is in column ord_billto and is varchar(8) and this is populated into billto in wynne_incidents

tchin-nin
Level 10

Re: Error Submitting Form to SQL

So your doing a lookup onchange of the Trip # ? What is exactly your billto textInput text property ?

If you fill the billto text input by manually typing some text, does the submit works ?

Théo