I have multiple dropdown options that adds or deletes a row from a table. Trouble is after I have placed a date or time in fields elsewhere on the form, that data is deleted after I make a selection on the dropdown. The dropdown has the options of In, Out, N/A, or N/O and when Out is selected the AddInstance is invoked adding a row to the table and when any of the others are selected the RemoveInstance removes the row. This part works fine but the values in the date and time fields are removed as a result of the selection. I have multiple dropdowns, and the code below will keep my data in the fields on the first selection but on subsequent selections the data for the data/time fileds are removed. Any recommendataions on what is going on and how I can stop this?
My codes appear below.
if (this.rawValue == 1) // If the value selected is "Out" of compliance then ...
School.ItemListPage.ObsRec._Rows.insertInstance(0); // Add an item to the table
else // If the value selected is "In", "N/A", or "N/O" then ...
School.ItemListPage.ObsRec._Rows.removeInstance(0); // Remove this item from the table