Frustration with auto-enter fields
This is exactly the discussion going on in another group I belong to:
"can auto-enter calcs replace true calcs". Jury's still out on this,
but probably not. Just like a stored calc, an auto-enter calc requires
one of its field parameters to change in order to trigger the calc
itself to change. So if you have a calc of:
case(a=b+c, d, e)
then a, b or c would need to change in order for the new value of either
d or e to fill in. But if you want the calc to update when 'f' changes,
then you need to include 'f' in the calc, something like:
case(f="Never", "Nothing", a=b+c, d, e)
This will always force itself to re-evaluate whenever f changes,
assuming that f will never be equal to "Never". If f changes and it is
something other then "Never", then it will evaluate a=b+c and result in
either d or e.
There are other tricks to getting around the trigger problem, to have
the calc re-evaluate itself every time the record is committed, for
example, by having it evaluate the 'last modified time'.
So in this way, an auto-enter calc can behave just like a stored calc
field, and almost like a lookup field. With the LookupNext() function,
it can behave exactly like a lookup field.
A benefit to the auto-enter calc over a regular stored calc is that the
auto-enter can contain the value of related fields. But like a stored
calc, an auto-enter calc cannot be triggered by a related field as its
parameter. In other words, the related value can be part of the result,
but changes to the related field itself will not trigger the calc to
refresh, even if that related field is part of the parameter.
Hope this is all somewhat enlightening to someone...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California
FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance
|