What i want to do is : check required fields for null values without (or before) saving the data to the database.
In a pre-save method.
I get the message when autosave is off and i am in a record and make a numeric field empty. (without saving)
It does not happen with a required text filed.
I have tested a column validation in the dataprovider, but i can not
test for null values there.
For a required numeric field, the validation method (dataprovider) is not executed when the field is empty/null. It is executed for any other value.
This seems to be a bug.
For required text fields the validation method is always executed, even
if the field is empty/null. As it should.
Validation global method to check null value on field text2 example :
I have same kind of situation. I also have the message
The message “Invalid input, validation failed for %%input%% , with null value”
I have an errorhandler and it is activated in my solution settings.
When I make a not null value empty, I see the errorhandler is triggered.
In my errorhandler I can even find the form that triggered the error using the application.getMethodTriggerFormName()
But I also would like to have the element that triggered the error. I expected that application.getMethodTriggerElementName() would have given the name of the element, but unfortunately that is not the case.
Is that a bug? Or is there another way to obtain the field that triggered the errorhandler.
And why do I see %%input%% in my message? Is it there to replace it myself by an own text? If so, it would be great if I have the field that triggered the problem.
Another problem is that when I make a field (null not allowed) on an existing record empty, that I want to continue filling my form until I save that data to the database. Is there anyway that I can unset/skip the NULL check while I’m editing my record (AutoSave=Off)? Now the cursor remains on that field and I can’t go to any other field on my form.
My error seem to be related to what is already described in this thread so I post it here.
We went into production with our application and users found that when removing a number in an integer field, we Servoy throws this error message!
The database field (Postgres) is integer, null allowed. So it must be possible to enter no value, i. e. remove an existing value in the field.
My questions are:
Where does this message come from?
What error handler is triggered here?
The number in the field get’s read and I can’t leave the field?
The app is locked and the user doesn’t know what to do… (I also don’t know)?
It obviously looks like a bug, but such a trivial bug???