R
Ronald S. Cook
At first, it's easy to say (have a policy) that we'll hard-code for
statuscode='ACT' (or maybe instead statuscode <> 'INA') but I think that
pigeonholes us and would cause limitations.
Example: We want to develop an Employee search screen. Obviously, we don't
want inactive records to be displayed.
The tables look like this:
Employee
--------
EmployeeId
EmployeeLastName
StatusLookupId
TypeLookupId
Lookup
------
LookupId
LookupGroup
LookupCode
LookupValue
Assume the values for EmployeeStatus are: Active, OnLeave, Probation,
Retired, Terminated (i.e. not a straight forward Active or Inactive)
Assume the values for EmployeeType are: Intern, Co-op, Exempt, Non-Exempt
See how things can get tricky quickly if we're not careful? Maybe the
developer of the client would want Active and Probation employee records
returned. Maybe they want all types except for Retired or Terminated? The
latter is especially tricky if we later add a new status (e.g. Deceased).
Dead employees would then be returned (not good).
I'd be interested in the perspective of others.
Thanks,
Ron
statuscode='ACT' (or maybe instead statuscode <> 'INA') but I think that
pigeonholes us and would cause limitations.
Example: We want to develop an Employee search screen. Obviously, we don't
want inactive records to be displayed.
The tables look like this:
Employee
--------
EmployeeId
EmployeeLastName
StatusLookupId
TypeLookupId
Lookup
------
LookupId
LookupGroup
LookupCode
LookupValue
Assume the values for EmployeeStatus are: Active, OnLeave, Probation,
Retired, Terminated (i.e. not a straight forward Active or Inactive)
Assume the values for EmployeeType are: Intern, Co-op, Exempt, Non-Exempt
See how things can get tricky quickly if we're not careful? Maybe the
developer of the client would want Active and Probation employee records
returned. Maybe they want all types except for Retired or Terminated? The
latter is especially tricky if we later add a new status (e.g. Deceased).
Dead employees would then be returned (not good).
I'd be interested in the perspective of others.
Thanks,
Ron