Does anybody use the "At end of enter, set default value if field not touched by user" setting for a default field value? If so, can you confirm that it doesn't work in forms? (I suppose I shouldn't have asked the first question but I'm finding it hard to believe anybody else in Alphadom is using it since it doesn't appear to work in forms. If anybody else is using it, I would think it would have been brought up a long time ago.)
I set a field's default value to "At end of enter, set default value if field not touched by user" and it works perfectly in the default browse.
(Well, sorta perfectly - the function that defines the default is triggered at the beginning of data entry also but it doesn't seem to enter the value at that point so I guess it's OK. I wanted to mention this "also at the beginning" issue because you'll probably run into it yourself if you test it.)
However, in the default form it triggers at the beginning of the enter operation (just as in the browse) but NOT at the end. The obvious result is that the default value isn't set.
FWIW: I confirmed the above by creating a user defined function to determine the default value - it was a complex calculation. I simply added a Debug(1) to the function to find out what was happening. As soon as I clicked the icon to start a new record in either the default form or default browse, the debugger started. When in the default browse, the debugger started both when starting the record and when saving the record. However, the debugger only triggered at the beginning when in the form.
I set a field's default value to "At end of enter, set default value if field not touched by user" and it works perfectly in the default browse.
(Well, sorta perfectly - the function that defines the default is triggered at the beginning of data entry also but it doesn't seem to enter the value at that point so I guess it's OK. I wanted to mention this "also at the beginning" issue because you'll probably run into it yourself if you test it.)
However, in the default form it triggers at the beginning of the enter operation (just as in the browse) but NOT at the end. The obvious result is that the default value isn't set.
FWIW: I confirmed the above by creating a user defined function to determine the default value - it was a complex calculation. I simply added a Debug(1) to the function to find out what was happening. As soon as I clicked the icon to start a new record in either the default form or default browse, the debugger started. When in the default browse, the debugger started both when starting the record and when saving the record. However, the debugger only triggered at the beginning when in the form.
Comment