[SOLVED] null default if left blank on update

Hello!

I post this the last week on scriptcase v8 discussion group, but i think that this can be considered as a bug.

Is there any way that ScriptCase use the “calculated by the database if empty” option on update?

I use this option on insert, setting the default value to null at database level for those fields, and works fine, but each new update fails because Scriptcase tries to update this fields with 0 or ‘’ if I leave them blank.

One option would be to set all these fields to null in the onBeforeUpdate event, but I would like to leave this to database level.

I think that if this option is not available, should be implemented by the Scriptcase team…

Why don’t use “null” option on dropdown, directly on update?

I do not know if I explained well:

I have a numeric field whose default value is null at database level.
I configured the option: “Calculated by the database if blank” on insert and everything works well here.
The problem is that this option does not exist on update.

Later, if I retrieve that record, the field with null value appears blank on the form, but when I click the update button, without changing that field. Scriptcase update that field to 0 if it is a numerical or to blank if the field is a text field, which is an serious error!!

I do not want to update to null the field, what I want is that if a field is null, ScriptCase don’t change it on their own on update.

Another question is if I decide to set the field to 0. How can I distinguish this situation of when i want to leave the field without value, I mean to null?

You were right GIU.

When I tried did not work me, but now works perfectly using the null option on dropdown on update. Thanks for your help.