create function "pears"."ShiftColourOverride"( in "shiftid" char(20),in "planid" char(20) )
returns integer
begin
-- return 1 to apply colour
if "isnull"("shiftid",'') > '' then
-- shift logic
end if;
if "isnull"("planid",'') > '' then
-- shiftplan logic
end if;
return 0
end