Column cannot be null, but it has a value in it!

I can't save any record of 2 web apps I'd just created. An error tells me that the email field cannot be null, but that field has a value.

Also, if I modify a record that was previously recorded directly from the DB, the email field with a value is deleted as soon as I click on the Save button.

Is it a bug or is there a solution for this?

Thanks.

Welcome Roberto!
A few things....
Is the pattern set differently?
Also, how are you passing the email value in?
{{email.value}}?
Are you Submitting the form or using another Event handler?
Any more screenshots? What does the form data look like before being submitted {{yourform.data}}, etc..

1 Like

Hi Scott, the only thing that I did was to create the web apps, nothing else I've related to the questions you are asking.

Should I pass the email value as you mention? Use an event handler as well?

I thought it would be easier to create a web app, should I add coding to any web app I create? :thinking:

@Roberto_Torres , looking at the mysql insert statement the value for email is NULL. So there is something going wrong passing the data from the form or field to the statement.
Can you post your mysql query which should insert the data?

2 Likes

Thanks Marc, I'd just found out the problem searching for the query within Retool. The name of the field name didn't exist. So I changed it and it worked!

image

Thank you! :facepunch:t3:

1 Like