Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.WPKLocalSwitchValue ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Original SQL ===== <code sql> create function "pears"."WPKLocalSwitchValue"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "SwitchID" char(20),in "SwitchLocation" char(20),in "SwitchSource" char(1),in "SwitchLocked" smallint,in "SwitchLocalisable" smallint ) returns long varchar begin declare "rv" long varchar; set "rv" = null; if "switchlocked" = 1 or "switchsource" not in( 'L','P' ) then -- Only unlocked Literal and Params switches can be over-ridden in this way return "rv" end if; if "switchlocation" is not null and "switchlocalisable" = 1 then select first "value" into "rv" from "wpkglobalswitchsetting" where "wpkglobalswitchid" = "switchid" and "location" = "switchlocation" end if; if "switchsource" = 'L' and "rv" is null then -- Params continue to have their global value stored in the params table select first "value" into "rv" from "wpkglobalswitchsetting" where "wpkglobalswitchid" = "switchid" and "location" = 'Global' end if; return "rv" end </code> database/functions/pears_wpklocalswitchvalue.txt Last modified: 2026/08/07 19:24by 127.0.0.1