Does insert command fail to execute if null values are encountered ?

Does insert command fail to execute if null values are encountered ?

Hi Team,

I have a Parent From with foll fields

  1. Exec Name
  2. Designation
  3. Company Name (Drop down with list of existing companies from company master populated at runtime +  "-Not in list- "
  4. Address
  5. City
  6. State
  7. Website

When CompanyName = "-Not in list- "is selected, a text box is shown to the end user to enter the company name

Other details are filled.. and form submit.

On Form submit, I have Insert command for

  
  1.  if(CompanyName =="-Not in list-")
  2. {
  3. [ insert into CompanyMaster
  4. Company Name = input.companynametextbox
  5. City = input.city
  6. State= input.state
  7. ]
  8. }

The above command gets executed correctly, when all of the fields are entered (Name, city, STate) in the parent form

However, if the user enters only the Company name text box, (&skips adding data to city and state), the insert command fails to execute.

The parent form still captures the data

What could i be doing wrong? I am just not able to put my finger to it.
Thank you,
Best Regards.


-Deepa Govind