Hi
I'm building a form with several fields to be inserted.
Depending on the value of field with select-list, some values need to be defaulted to *
For this I used a a dynamic action like this.


The Javescript code looks like this.
var RuleCode = apex.item( "P321_RULE_CODE" ).getValue();
if ( RuleCode == 'STD') {
apex.item( "P321_SRC_SEC_ZONE_CODE" ).enable();
apex.item( "P321_SRC_SEC_ZONE_CODE" ).setValue( "" );
} else if ( RuleCode == 'EXC' ) {
apex.item( "P321_SRC_SEC_ZONE_CODE" ).disable();
apex.item( "P321_SRC_SEC_ZONE_CODE" ).setValue( "*" );
} else {
apex.item( "P321_SRC_SEC_ZONE_CODE" ).disable();
apex.item( "P321_SRC_SEC_ZONE_CODE" ).setValue( "" );
}
The setting and enabling & disabling of the fields works as supposed.
But when I press submit to create the records, it gives an error that the field doesn't have a value set.
> ORA-01400: cannot insert NULL into

What am I missing?
I also tried this.
apex.item(document.getElementById('P321_SRC_SEC_ZONE_CODE')).setValue('*');
$s( "P321_SRC_SEC_ZONE_CODE", "*" );
Any help is welcome.
thx
cheers
Wim