From 91af030ac82aa2ecdf8098e6230b31c5631bbffe Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Tue, 9 Jun 2026 23:37:27 +0000 Subject: [PATCH] Validate LOCATIONS_B.EnteredBy against PEOPLE.Active --- db/schemas/lib/triggers/create/locations_b.m4 | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/db/schemas/lib/triggers/create/locations_b.m4 b/db/schemas/lib/triggers/create/locations_b.m4 index 3477962..ac12804 100644 --- a/db/schemas/lib/triggers/create/locations_b.m4 +++ b/db/schemas/lib/triggers/create/locations_b.m4 @@ -205,6 +205,37 @@ CREATE OR REPLACE FUNCTION locations_b_func () _check_no_related_follow() END IF; + changequote({,})dnl + person_active({LOCATIONS_B}, {EnteredBy}, + {'Key (LBID = (' + || NEW.lbid + || '): Value (FID) = (' + || textualize(NEW.fid) + || '): Value (AnimID) = (' + || textualize(NEW.animid) + || '): Value (Date) = (' + || textualize(NEW.date) + || '): Value (Time) = (' + || NEW.time + || '): Value (X) = (' + || textualize(NEW.x) + || '): Value (Y) = (' + || textualize(NEW.y) + || '): Value (Elevation) = (' + || textualize(NEW.elevation) + || '): Value (MapSeq) = (' + || textualize(NEW.mapseq) + || '): Value (MetersToNextMapSeq) = (' + || textualize(NEW.meterstonextmapseq) + || '): Value (CommID) = (' + || NEW.commid + || '): Value (FollowNum) = (' + || NEW.follownum + || '): Value (Origin) = (' + || NEW.origin + || ')'}) + changequote(`,')dnl + RETURN NULL; END; $$; -- 2.34.1