r/lowcode • • Oct 14 '26

Keeping historical approval records accurate when linked employee details change

Take a simple low-code equipment-request app. A request links to an employee record, which supplies their department and manager. The request is approved while they work in Design; a month later they move to Operations.

The employee profile should show the new team. The old approval and its department report should still reflect who owned the request when it was approved. A live lookup alone seems like the wrong source for that historical view.

I'd keep the employee link for navigation, but copy the department and approver into the request at approval time. The awkward case is correcting a typo later: you want to fix a misspelled department name without making an actual team transfer rewrite history.

How do you separate those two cases in a low-code app? Do you store both the department ID and its displayed name in the approval snapshot, or keep a versioned department table? I'm interested in a maintainable data model, without having to freeze every field on every related record.

3 Upvotes

4 comments sorted by

1

u/Zealousideal_Art1720 Oct 14 '26

Store the stable IDs plus a display snapshot on the approval: department_id, department_name_snapshot, approver_id, approver_name_snapshot.

The employee link stays for navigation, but historical reports read from the approval snapshot not the employee’s current department. That prevents a later transfer from rewriting history.

For the typo case, distinguish:

  • Correction: same department, wrong label → fix the department name; optionally backfill the snapshot or report by department_id.
  • Transfer/reorg: new fact → create a new department version/assignment; old approvals stay unchanged.

You don’t need to version every field. Version only reference data where historical reporting matters, department here and snapshot only the fields that defined the approval decision.

1

u/Normal_Succotash_520 Oct 15 '26

Reporting by department_id seems like the useful escape hatch here. The historical approval can retain the original label, while a current report can display the corrected department name without editing the approval itself. If a snapshot does need a correction, I'd want the old value and reason retained rather than a silent backfill. That keeps a typo fix distinguishable from a change to who actually approved the request.

1

u/Top-Cauliflower-1808 Oct 14 '26

Store the department ID and the name at approval time so history stays accurate. Then fix typos in the department table itself and let the snapshot keep the old label.