I set a field to a default value with the following rule:
If TestProtect3 IS NEW AND TestProtect3.ProtectFieldTest IS UNDEFINED Then
TestProtect3.ProtectFieldTest='the default value'
I allow this field to be editable only if another field is set to a specific value (such as 'Allow') with the following rule:
If TestProtect3.SomeTextField IS UNDEFINED OR TestProtect3.SomeTextField<>'Allow' Then
PROTECT TestProtect3.ProtectFieldTest FROM ALL
The problem is that the default value is not saved for TestProtect3.ProtectFieldTest if TestProtect3.SomeTextField is not set to 'Allow'.
The following log entries show TestProtect3.ProtectFieldTest being set to the default value:
Executing action TestProtect3.ProtectFieldTest='the default value' from rules of object TestProtect3
ProtectFieldTest=the default value
But farther down in the log TestProtect3.ProtectFieldTest is being unset because of the protection.
Executing action READ PROTECT TestProtect3.ProtectFieldTest FROM ALL from rules of object TestProtect3
-Access to attribute ProtectFieldTest of business object TestProtect3 is denied. Restoring old value undefined
Is there a work around for this?