Tabular form error [message #538317] |
Thu, 05 January 2012 04:22 |
|
balckbandit5
Messages: 104 Registered: December 2011
|
Senior Member |
|
|
Hello
I'm getting an error on my tabular form, it is layed out as so:
[ ] Title Lastname Firstname Company Email
[ ] Mr/Ms/Mrs [ ] [ ] [ ] [ ]
-first column is a checkbox
-'title' is a select list default value "Mr"
-the rest are normal text boxes
-Validation:Lastname cannot be null
-validation Firstname cannot be null
Now the error occurs in only 1 situation:When you click the 'add row' button, but don't edit any boxes before you click 'save'.
If you do that you get an error saying cannot enter NULL into LASTNAME (which is because the database its going into doesn't allow a null value for that column)
If you change anything the validations stop you from advancing if lastname or firstname is null...so why don't the validations kick in until you change something? and why does the MRU process not ignore the empty row like the validations seem to?
It seems strange that they don't both act the same towards it...
My assumption is that it has something to do with the select list having a default value because I have several other tabular forms in my app and another has 4 select lists and it has the same error, but the ones that don't have a select list have no error...
So yeh any help/thoughts appreciated
UPDATE: I've been fiddling round with the form and I have found that the select lists didn't actually have default values as such...they just weren't displaying the null value. So I tried 2 things
a)I changed it so that it does display the null value (not ideal but it worked)
and
b)I actually set a default value, which worked for static LOVs but I can't seem to set the default for a dynamic LOV...It displays the visit type (private or professional) and returns the ID ... So I tried setting the default vale to Private and to the corresponding Id but neither worked...
So I guess is there a way to do that?
[Updated on: Thu, 05 January 2012 05:27] Report message to a moderator
|
|
|
|