# WidgetDef

ModelName: SRH-2D
WidgetName:
Sediment Size Class Cutoff (note: the size class is the table number minus 1 for the threshold particle size)_32


# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11) END FROM WidgetInst WHERE WidgetInstId = 11) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12) END FROM WidgetInst WHERE WidgetInstId = 12) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14) END FROM WidgetInst WHERE WidgetInstId = 14) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 11) END FROM WidgetInst WHERE WidgetInstId = 11) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 12) END FROM WidgetInst WHERE WidgetInstId = 12) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 25;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 14) END FROM WidgetInst WHERE WidgetInstId = 14) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 26;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 36;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 38;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 44;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 52;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 48) END FROM WidgetInst WHERE WidgetInstId = 48) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 54;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 50) END FROM WidgetInst WHERE WidgetInstId = 50) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 56;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 58;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 48) END FROM WidgetInst WHERE WidgetInstId = 48) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 60;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 50) END FROM WidgetInst WHERE WidgetInstId = 50) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 62;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 64;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 48) END FROM WidgetInst WHERE WidgetInstId = 48) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 66;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 50) END FROM WidgetInst WHERE WidgetInstId = 50) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 68;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 70;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 48) END FROM WidgetInst WHERE WidgetInstId = 48) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 72;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 50) END FROM WidgetInst WHERE WidgetInstId = 50) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 74;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 76;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 48) END FROM WidgetInst WHERE WidgetInstId = 48) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 78;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 50) END FROM WidgetInst WHERE WidgetInstId = 50) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 80;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 82;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 48) END FROM WidgetInst WHERE WidgetInstId = 48) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 84;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 50) END FROM WidgetInst WHERE WidgetInstId = 50) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 86;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 88;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 48) END FROM WidgetInst WHERE WidgetInstId = 48) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 90;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 50) END FROM WidgetInst WHERE WidgetInstId = 50) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 92;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 94;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 96;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 98;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 43) END FROM WidgetInst WHERE WidgetInstId = 43) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 127) END FROM WidgetInst WHERE WidgetInstId = 127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 128;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 137) END FROM WidgetInst WHERE WidgetInstId = 137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 140) END FROM WidgetInst WHERE WidgetInstId = 140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 145) END FROM WidgetInst WHERE WidgetInstId = 145) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 145) END FROM WidgetInst WHERE WidgetInstId = 145) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 137) END FROM WidgetInst WHERE WidgetInstId = 137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 163;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 177;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 177;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 177;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 177;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 177;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 180) END FROM WidgetInst WHERE WidgetInstId = 180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 197) END FROM WidgetInst WHERE WidgetInstId = 197) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 197) END FROM WidgetInst WHERE WidgetInstId = 197) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 206) END FROM WidgetInst WHERE WidgetInstId = 206) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 206) END FROM WidgetInst WHERE WidgetInstId = 206) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 206) END FROM WidgetInst WHERE WidgetInstId = 206) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 218) END FROM WidgetInst WHERE WidgetInstId = 218)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 220) END FROM WidgetInst WHERE WidgetInstId = 220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 220) END FROM WidgetInst WHERE WidgetInstId = 220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 220) END FROM WidgetInst WHERE WidgetInstId = 220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 220) END FROM WidgetInst WHERE WidgetInstId = 220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 218) END FROM WidgetInst WHERE WidgetInstId = 218)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 220) END FROM WidgetInst WHERE WidgetInstId = 220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 220) END FROM WidgetInst WHERE WidgetInstId = 220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 236) END FROM WidgetInst WHERE WidgetInstId = 236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 220) END FROM WidgetInst WHERE WidgetInstId = 220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 220) END FROM WidgetInst WHERE WidgetInstId = 220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 236) END FROM WidgetInst WHERE WidgetInstId = 236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 220) END FROM WidgetInst WHERE WidgetInstId = 220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 220) END FROM WidgetInst WHERE WidgetInstId = 220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 281) END FROM WidgetInst WHERE WidgetInstId = 281) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 281) END FROM WidgetInst WHERE WidgetInstId = 281) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 281) END FROM WidgetInst WHERE WidgetInstId = 281) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 286;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 288;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 297) END FROM WidgetInst WHERE WidgetInstId = 297) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 297) END FROM WidgetInst WHERE WidgetInstId = 297) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 300;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 297) END FROM WidgetInst WHERE WidgetInstId = 297) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 302;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 317) END FROM WidgetInst WHERE WidgetInstId = 317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 317) END FROM WidgetInst WHERE WidgetInstId = 317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 317) END FROM WidgetInst WHERE WidgetInstId = 317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 324;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 337) END FROM WidgetInst WHERE WidgetInstId = 337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 337) END FROM WidgetInst WHERE WidgetInstId = 337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 337) END FROM WidgetInst WHERE WidgetInstId = 337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 343) END FROM WidgetInst WHERE WidgetInstId = 343) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 337) END FROM WidgetInst WHERE WidgetInstId = 337)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 343) END FROM WidgetInst WHERE WidgetInstId = 343) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 337) END FROM WidgetInst WHERE WidgetInstId = 337)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 343) END FROM WidgetInst WHERE WidgetInstId = 343) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 337) END FROM WidgetInst WHERE WidgetInstId = 337)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 352) END FROM WidgetInst WHERE WidgetInstId = 352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 352) END FROM WidgetInst WHERE WidgetInstId = 352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 352) END FROM WidgetInst WHERE WidgetInstId = 352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 352) END FROM WidgetInst WHERE WidgetInstId = 352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 376) END FROM WidgetInst WHERE WidgetInstId = 376) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 376) END FROM WidgetInst WHERE WidgetInstId = 376) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 376) END FROM WidgetInst WHERE WidgetInstId = 376) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 376) END FROM WidgetInst WHERE WidgetInstId = 376) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 413) END FROM WidgetInst WHERE WidgetInstId = 413) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 414;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 420;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 420;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 420;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 420;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 420;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 420;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 421;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 421;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 421;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 421;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 421;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 426) END FROM WidgetInst WHERE WidgetInstId = 426) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 427) END FROM WidgetInst WHERE WidgetInstId = 427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 457;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 460) END FROM WidgetInst WHERE WidgetInstId = 460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 461) END FROM WidgetInst WHERE WidgetInstId = 461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 460) END FROM WidgetInst WHERE WidgetInstId = 460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 461) END FROM WidgetInst WHERE WidgetInstId = 461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 478) END FROM WidgetInst WHERE WidgetInstId = 478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 479) END FROM WidgetInst WHERE WidgetInstId = 479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 478) END FROM WidgetInst WHERE WidgetInstId = 478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 479) END FROM WidgetInst WHERE WidgetInstId = 479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 478) END FROM WidgetInst WHERE WidgetInstId = 478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 479) END FROM WidgetInst WHERE WidgetInstId = 479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 502) END FROM WidgetInst WHERE WidgetInstId = 502)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 503) END FROM WidgetInst WHERE WidgetInstId = 503)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 506) END FROM WidgetInst WHERE WidgetInstId = 506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 507) END FROM WidgetInst WHERE WidgetInstId = 507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 506) END FROM WidgetInst WHERE WidgetInstId = 506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 507) END FROM WidgetInst WHERE WidgetInstId = 507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 506) END FROM WidgetInst WHERE WidgetInstId = 506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 507) END FROM WidgetInst WHERE WidgetInstId = 507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 506) END FROM WidgetInst WHERE WidgetInstId = 506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 507) END FROM WidgetInst WHERE WidgetInstId = 507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 502) END FROM WidgetInst WHERE WidgetInstId = 502)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 503) END FROM WidgetInst WHERE WidgetInstId = 503)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 506) END FROM WidgetInst WHERE WidgetInstId = 506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 507) END FROM WidgetInst WHERE WidgetInstId = 507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 506) END FROM WidgetInst WHERE WidgetInstId = 506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 507) END FROM WidgetInst WHERE WidgetInstId = 507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 538) END FROM WidgetInst WHERE WidgetInstId = 538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 539) END FROM WidgetInst WHERE WidgetInstId = 539) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 506) END FROM WidgetInst WHERE WidgetInstId = 506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 507) END FROM WidgetInst WHERE WidgetInstId = 507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 506) END FROM WidgetInst WHERE WidgetInstId = 506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 507) END FROM WidgetInst WHERE WidgetInstId = 507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 538) END FROM WidgetInst WHERE WidgetInstId = 538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 539) END FROM WidgetInst WHERE WidgetInstId = 539) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 506) END FROM WidgetInst WHERE WidgetInstId = 506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 507) END FROM WidgetInst WHERE WidgetInstId = 507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 506) END FROM WidgetInst WHERE WidgetInstId = 506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 507) END FROM WidgetInst WHERE WidgetInstId = 507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 628) END FROM WidgetInst WHERE WidgetInstId = 628) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 629) END FROM WidgetInst WHERE WidgetInstId = 629) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 628) END FROM WidgetInst WHERE WidgetInstId = 628) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 629) END FROM WidgetInst WHERE WidgetInstId = 629) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 628) END FROM WidgetInst WHERE WidgetInstId = 628) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 629) END FROM WidgetInst WHERE WidgetInstId = 629) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 660) END FROM WidgetInst WHERE WidgetInstId = 660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 661) END FROM WidgetInst WHERE WidgetInstId = 661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 660) END FROM WidgetInst WHERE WidgetInstId = 660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 661) END FROM WidgetInst WHERE WidgetInstId = 661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 660) END FROM WidgetInst WHERE WidgetInstId = 660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 661) END FROM WidgetInst WHERE WidgetInstId = 661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 674;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 700) END FROM WidgetInst WHERE WidgetInstId = 700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 702;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 701) END FROM WidgetInst WHERE WidgetInstId = 701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 700) END FROM WidgetInst WHERE WidgetInstId = 700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 701) END FROM WidgetInst WHERE WidgetInstId = 701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 700) END FROM WidgetInst WHERE WidgetInstId = 700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 710;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 701) END FROM WidgetInst WHERE WidgetInstId = 701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 740) END FROM WidgetInst WHERE WidgetInstId = 740) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 742;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 741) END FROM WidgetInst WHERE WidgetInstId = 741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 740) END FROM WidgetInst WHERE WidgetInstId = 740) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 741) END FROM WidgetInst WHERE WidgetInstId = 741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 740) END FROM WidgetInst WHERE WidgetInstId = 740) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 741) END FROM WidgetInst WHERE WidgetInstId = 741) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 752) END FROM WidgetInst WHERE WidgetInstId = 752) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 740) END FROM WidgetInst WHERE WidgetInstId = 740)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 753) END FROM WidgetInst WHERE WidgetInstId = 753) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 741) END FROM WidgetInst WHERE WidgetInstId = 741)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 752) END FROM WidgetInst WHERE WidgetInstId = 752) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 740) END FROM WidgetInst WHERE WidgetInstId = 740)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 753) END FROM WidgetInst WHERE WidgetInstId = 753) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 741) END FROM WidgetInst WHERE WidgetInstId = 741)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 752) END FROM WidgetInst WHERE WidgetInstId = 752) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 740) END FROM WidgetInst WHERE WidgetInstId = 740)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 753) END FROM WidgetInst WHERE WidgetInstId = 753) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 741) END FROM WidgetInst WHERE WidgetInstId = 741)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 770) END FROM WidgetInst WHERE WidgetInstId = 770) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 771) END FROM WidgetInst WHERE WidgetInstId = 771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 770) END FROM WidgetInst WHERE WidgetInstId = 770) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 771) END FROM WidgetInst WHERE WidgetInstId = 771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 770) END FROM WidgetInst WHERE WidgetInstId = 770) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 771) END FROM WidgetInst WHERE WidgetInstId = 771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 770) END FROM WidgetInst WHERE WidgetInstId = 770) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 771) END FROM WidgetInst WHERE WidgetInstId = 771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 813;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 818) END FROM WidgetInst WHERE WidgetInstId = 818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 819) END FROM WidgetInst WHERE WidgetInstId = 819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 818) END FROM WidgetInst WHERE WidgetInstId = 818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 819) END FROM WidgetInst WHERE WidgetInstId = 819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 818) END FROM WidgetInst WHERE WidgetInstId = 818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 819) END FROM WidgetInst WHERE WidgetInstId = 819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 818) END FROM WidgetInst WHERE WidgetInstId = 818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 854;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 819) END FROM WidgetInst WHERE WidgetInstId = 819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 862) END FROM WidgetInst WHERE WidgetInstId = 862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 863) END FROM WidgetInst WHERE WidgetInstId = 863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 862) END FROM WidgetInst WHERE WidgetInstId = 862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 863) END FROM WidgetInst WHERE WidgetInstId = 863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 862) END FROM WidgetInst WHERE WidgetInstId = 862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 863) END FROM WidgetInst WHERE WidgetInstId = 863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 862) END FROM WidgetInst WHERE WidgetInstId = 862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 863) END FROM WidgetInst WHERE WidgetInstId = 863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 862) END FROM WidgetInst WHERE WidgetInstId = 862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 863) END FROM WidgetInst WHERE WidgetInstId = 863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 862) END FROM WidgetInst WHERE WidgetInstId = 862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 863) END FROM WidgetInst WHERE WidgetInstId = 863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 420) END FROM WidgetInst WHERE WidgetInstId = 420) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 888;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 421) END FROM WidgetInst WHERE WidgetInstId = 421) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 889;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 892) END FROM WidgetInst WHERE WidgetInstId = 892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 893) END FROM WidgetInst WHERE WidgetInstId = 893) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 899) END FROM WidgetInst WHERE WidgetInstId = 899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 899) END FROM WidgetInst WHERE WidgetInstId = 899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 902;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 907) END FROM WidgetInst WHERE WidgetInstId = 907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 908) END FROM WidgetInst WHERE WidgetInstId = 908) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 909) END FROM WidgetInst WHERE WidgetInstId = 909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 907) END FROM WidgetInst WHERE WidgetInstId = 907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 908) END FROM WidgetInst WHERE WidgetInstId = 908) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 909) END FROM WidgetInst WHERE WidgetInstId = 909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 923) END FROM WidgetInst WHERE WidgetInstId = 923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 923) END FROM WidgetInst WHERE WidgetInstId = 923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 931) END FROM WidgetInst WHERE WidgetInstId = 931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 932) END FROM WidgetInst WHERE WidgetInstId = 932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 933) END FROM WidgetInst WHERE WidgetInstId = 933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 931) END FROM WidgetInst WHERE WidgetInstId = 931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 932) END FROM WidgetInst WHERE WidgetInstId = 932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 933) END FROM WidgetInst WHERE WidgetInstId = 933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 947) END FROM WidgetInst WHERE WidgetInstId = 947) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 947) END FROM WidgetInst WHERE WidgetInstId = 947) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 955) END FROM WidgetInst WHERE WidgetInstId = 955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 956) END FROM WidgetInst WHERE WidgetInstId = 956) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 957) END FROM WidgetInst WHERE WidgetInstId = 957) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 955) END FROM WidgetInst WHERE WidgetInstId = 955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 956) END FROM WidgetInst WHERE WidgetInstId = 956) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 957) END FROM WidgetInst WHERE WidgetInstId = 957) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 971) END FROM WidgetInst WHERE WidgetInstId = 971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 971) END FROM WidgetInst WHERE WidgetInstId = 971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 979) END FROM WidgetInst WHERE WidgetInstId = 979) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 980) END FROM WidgetInst WHERE WidgetInstId = 980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 983;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 981) END FROM WidgetInst WHERE WidgetInstId = 981) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 984;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 979) END FROM WidgetInst WHERE WidgetInstId = 979) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 980) END FROM WidgetInst WHERE WidgetInstId = 980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 981) END FROM WidgetInst WHERE WidgetInstId = 981) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1011) END FROM WidgetInst WHERE WidgetInstId = 1011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1013) END FROM WidgetInst WHERE WidgetInstId = 1013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1011) END FROM WidgetInst WHERE WidgetInstId = 1011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1013) END FROM WidgetInst WHERE WidgetInstId = 1013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1011) END FROM WidgetInst WHERE WidgetInstId = 1011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1013) END FROM WidgetInst WHERE WidgetInstId = 1013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1011) END FROM WidgetInst WHERE WidgetInstId = 1011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1013) END FROM WidgetInst WHERE WidgetInstId = 1013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1011) END FROM WidgetInst WHERE WidgetInstId = 1011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1013) END FROM WidgetInst WHERE WidgetInstId = 1013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 1011) END FROM WidgetInst WHERE WidgetInstId = 1011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 1013) END FROM WidgetInst WHERE WidgetInstId = 1013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 1011) END FROM WidgetInst WHERE WidgetInstId = 1011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 1013) END FROM WidgetInst WHERE WidgetInstId = 1013) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 1006) END FROM WidgetInst WHERE WidgetInstId = 1006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 1090) END FROM WidgetInst WHERE WidgetInstId = 1090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1100) END FROM WidgetInst WHERE WidgetInstId = 1100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 1103) END FROM WidgetInst WHERE WidgetInstId = 1103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 1108) END FROM WidgetInst WHERE WidgetInstId = 1108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 1108) END FROM WidgetInst WHERE WidgetInstId = 1108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1100) END FROM WidgetInst WHERE WidgetInstId = 1100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1126;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 1140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 1140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 1140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 1140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 1140;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 1140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1143) END FROM WidgetInst WHERE WidgetInstId = 1143) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1160) END FROM WidgetInst WHERE WidgetInstId = 1160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1160) END FROM WidgetInst WHERE WidgetInstId = 1160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1169) END FROM WidgetInst WHERE WidgetInstId = 1169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1169) END FROM WidgetInst WHERE WidgetInstId = 1169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1169) END FROM WidgetInst WHERE WidgetInstId = 1169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1181) END FROM WidgetInst WHERE WidgetInstId = 1181)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1183) END FROM WidgetInst WHERE WidgetInstId = 1183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1183) END FROM WidgetInst WHERE WidgetInstId = 1183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1183) END FROM WidgetInst WHERE WidgetInstId = 1183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1183) END FROM WidgetInst WHERE WidgetInstId = 1183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1181) END FROM WidgetInst WHERE WidgetInstId = 1181)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1183) END FROM WidgetInst WHERE WidgetInstId = 1183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1183) END FROM WidgetInst WHERE WidgetInstId = 1183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1199) END FROM WidgetInst WHERE WidgetInstId = 1199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1183) END FROM WidgetInst WHERE WidgetInstId = 1183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1183) END FROM WidgetInst WHERE WidgetInstId = 1183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1199) END FROM WidgetInst WHERE WidgetInstId = 1199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1183) END FROM WidgetInst WHERE WidgetInstId = 1183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1183) END FROM WidgetInst WHERE WidgetInstId = 1183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1211;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1244) END FROM WidgetInst WHERE WidgetInstId = 1244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1244) END FROM WidgetInst WHERE WidgetInstId = 1244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1244) END FROM WidgetInst WHERE WidgetInstId = 1244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1260) END FROM WidgetInst WHERE WidgetInstId = 1260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1260) END FROM WidgetInst WHERE WidgetInstId = 1260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1260) END FROM WidgetInst WHERE WidgetInstId = 1260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1280) END FROM WidgetInst WHERE WidgetInstId = 1280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1280) END FROM WidgetInst WHERE WidgetInstId = 1280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1280) END FROM WidgetInst WHERE WidgetInstId = 1280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1300) END FROM WidgetInst WHERE WidgetInstId = 1300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1301;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1300) END FROM WidgetInst WHERE WidgetInstId = 1300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1300) END FROM WidgetInst WHERE WidgetInstId = 1300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1306) END FROM WidgetInst WHERE WidgetInstId = 1306) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1300) END FROM WidgetInst WHERE WidgetInstId = 1300)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1306) END FROM WidgetInst WHERE WidgetInstId = 1306) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1300) END FROM WidgetInst WHERE WidgetInstId = 1300)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1306) END FROM WidgetInst WHERE WidgetInstId = 1306) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1300) END FROM WidgetInst WHERE WidgetInstId = 1300)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1315) END FROM WidgetInst WHERE WidgetInstId = 1315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1315) END FROM WidgetInst WHERE WidgetInstId = 1315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1315) END FROM WidgetInst WHERE WidgetInstId = 1315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1315) END FROM WidgetInst WHERE WidgetInstId = 1315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 1140) END FROM WidgetInst WHERE WidgetInstId = 1140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1339) END FROM WidgetInst WHERE WidgetInstId = 1339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1339) END FROM WidgetInst WHERE WidgetInstId = 1339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1339) END FROM WidgetInst WHERE WidgetInstId = 1339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1339) END FROM WidgetInst WHERE WidgetInstId = 1339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 1361) END FROM WidgetInst WHERE WidgetInstId = 1361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1361) END FROM WidgetInst WHERE WidgetInstId = 1361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1361) END FROM WidgetInst WHERE WidgetInstId = 1361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1361) END FROM WidgetInst WHERE WidgetInstId = 1361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1361) END FROM WidgetInst WHERE WidgetInstId = 1361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1361) END FROM WidgetInst WHERE WidgetInstId = 1361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 1376) END FROM WidgetInst WHERE WidgetInstId = 1376) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1377;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 1391;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 1391;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 1391;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 1391;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 1391;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 1391;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 1392;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 1392;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 1392;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 1392;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 1392;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 1392;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 1393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 1393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 1393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 1393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 1393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 1393;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 1394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 1394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 1394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 1394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 1394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 1394;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 1395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 1395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 1395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 1395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 1395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 1395;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 1396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 1396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 1396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 1396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 1396;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 1396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1409) END FROM WidgetInst WHERE WidgetInstId = 1409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1410) END FROM WidgetInst WHERE WidgetInstId = 1410) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1411) END FROM WidgetInst WHERE WidgetInstId = 1411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1412) END FROM WidgetInst WHERE WidgetInstId = 1412) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1413) END FROM WidgetInst WHERE WidgetInstId = 1413) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1414) END FROM WidgetInst WHERE WidgetInstId = 1414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1500;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1502;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1511) END FROM WidgetInst WHERE WidgetInstId = 1511) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1512) END FROM WidgetInst WHERE WidgetInstId = 1512) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1513) END FROM WidgetInst WHERE WidgetInstId = 1513) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1514) END FROM WidgetInst WHERE WidgetInstId = 1514) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1515) END FROM WidgetInst WHERE WidgetInstId = 1515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1516) END FROM WidgetInst WHERE WidgetInstId = 1516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1511) END FROM WidgetInst WHERE WidgetInstId = 1511) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1512) END FROM WidgetInst WHERE WidgetInstId = 1512) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1513) END FROM WidgetInst WHERE WidgetInstId = 1513) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1514) END FROM WidgetInst WHERE WidgetInstId = 1514) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1515) END FROM WidgetInst WHERE WidgetInstId = 1515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1516) END FROM WidgetInst WHERE WidgetInstId = 1516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1565) END FROM WidgetInst WHERE WidgetInstId = 1565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1566) END FROM WidgetInst WHERE WidgetInstId = 1566) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1567) END FROM WidgetInst WHERE WidgetInstId = 1567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1568) END FROM WidgetInst WHERE WidgetInstId = 1568) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1569) END FROM WidgetInst WHERE WidgetInstId = 1569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1570) END FROM WidgetInst WHERE WidgetInstId = 1570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1565) END FROM WidgetInst WHERE WidgetInstId = 1565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1566) END FROM WidgetInst WHERE WidgetInstId = 1566) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1567) END FROM WidgetInst WHERE WidgetInstId = 1567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1568) END FROM WidgetInst WHERE WidgetInstId = 1568) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1569) END FROM WidgetInst WHERE WidgetInstId = 1569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1570) END FROM WidgetInst WHERE WidgetInstId = 1570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1565) END FROM WidgetInst WHERE WidgetInstId = 1565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1566) END FROM WidgetInst WHERE WidgetInstId = 1566) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1567) END FROM WidgetInst WHERE WidgetInstId = 1567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1568) END FROM WidgetInst WHERE WidgetInstId = 1568) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1569) END FROM WidgetInst WHERE WidgetInstId = 1569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1570) END FROM WidgetInst WHERE WidgetInstId = 1570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1637) END FROM WidgetInst WHERE WidgetInstId = 1637)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1655;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1638) END FROM WidgetInst WHERE WidgetInstId = 1638)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1639) END FROM WidgetInst WHERE WidgetInstId = 1639)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1640) END FROM WidgetInst WHERE WidgetInstId = 1640)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1641) END FROM WidgetInst WHERE WidgetInstId = 1641)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1642) END FROM WidgetInst WHERE WidgetInstId = 1642)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1649) END FROM WidgetInst WHERE WidgetInstId = 1649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1650) END FROM WidgetInst WHERE WidgetInstId = 1650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1674;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1651) END FROM WidgetInst WHERE WidgetInstId = 1651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1653) END FROM WidgetInst WHERE WidgetInstId = 1653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1654) END FROM WidgetInst WHERE WidgetInstId = 1654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1649) END FROM WidgetInst WHERE WidgetInstId = 1649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1650) END FROM WidgetInst WHERE WidgetInstId = 1650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1651) END FROM WidgetInst WHERE WidgetInstId = 1651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1653) END FROM WidgetInst WHERE WidgetInstId = 1653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1654) END FROM WidgetInst WHERE WidgetInstId = 1654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1649) END FROM WidgetInst WHERE WidgetInstId = 1649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1650) END FROM WidgetInst WHERE WidgetInstId = 1650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1651) END FROM WidgetInst WHERE WidgetInstId = 1651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1653) END FROM WidgetInst WHERE WidgetInstId = 1653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1701;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1654) END FROM WidgetInst WHERE WidgetInstId = 1654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1702;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1649) END FROM WidgetInst WHERE WidgetInstId = 1649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1650) END FROM WidgetInst WHERE WidgetInstId = 1650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1651) END FROM WidgetInst WHERE WidgetInstId = 1651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1653) END FROM WidgetInst WHERE WidgetInstId = 1653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1654) END FROM WidgetInst WHERE WidgetInstId = 1654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1708;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1637) END FROM WidgetInst WHERE WidgetInstId = 1637)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1638) END FROM WidgetInst WHERE WidgetInstId = 1638)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1710;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1639) END FROM WidgetInst WHERE WidgetInstId = 1639)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1640) END FROM WidgetInst WHERE WidgetInstId = 1640)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1712;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1641) END FROM WidgetInst WHERE WidgetInstId = 1641)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1642) END FROM WidgetInst WHERE WidgetInstId = 1642)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1649) END FROM WidgetInst WHERE WidgetInstId = 1649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1650) END FROM WidgetInst WHERE WidgetInstId = 1650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1651) END FROM WidgetInst WHERE WidgetInstId = 1651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1653) END FROM WidgetInst WHERE WidgetInstId = 1653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1654) END FROM WidgetInst WHERE WidgetInstId = 1654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1649) END FROM WidgetInst WHERE WidgetInstId = 1649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1650) END FROM WidgetInst WHERE WidgetInstId = 1650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1651) END FROM WidgetInst WHERE WidgetInstId = 1651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1736;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1653) END FROM WidgetInst WHERE WidgetInstId = 1653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1737;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1654) END FROM WidgetInst WHERE WidgetInstId = 1654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1738;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1745) END FROM WidgetInst WHERE WidgetInstId = 1745) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1746) END FROM WidgetInst WHERE WidgetInstId = 1746) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1747) END FROM WidgetInst WHERE WidgetInstId = 1747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1748) END FROM WidgetInst WHERE WidgetInstId = 1748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1749) END FROM WidgetInst WHERE WidgetInstId = 1749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1750) END FROM WidgetInst WHERE WidgetInstId = 1750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1649) END FROM WidgetInst WHERE WidgetInstId = 1649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1650) END FROM WidgetInst WHERE WidgetInstId = 1650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1651) END FROM WidgetInst WHERE WidgetInstId = 1651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1653) END FROM WidgetInst WHERE WidgetInstId = 1653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1654) END FROM WidgetInst WHERE WidgetInstId = 1654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1649) END FROM WidgetInst WHERE WidgetInstId = 1649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1650) END FROM WidgetInst WHERE WidgetInstId = 1650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1651) END FROM WidgetInst WHERE WidgetInstId = 1651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1653) END FROM WidgetInst WHERE WidgetInstId = 1653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1654) END FROM WidgetInst WHERE WidgetInstId = 1654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1774;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1745) END FROM WidgetInst WHERE WidgetInstId = 1745) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1746) END FROM WidgetInst WHERE WidgetInstId = 1746) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1747) END FROM WidgetInst WHERE WidgetInstId = 1747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1748) END FROM WidgetInst WHERE WidgetInstId = 1748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1749) END FROM WidgetInst WHERE WidgetInstId = 1749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1750) END FROM WidgetInst WHERE WidgetInstId = 1750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1649) END FROM WidgetInst WHERE WidgetInstId = 1649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1650) END FROM WidgetInst WHERE WidgetInstId = 1650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1651) END FROM WidgetInst WHERE WidgetInstId = 1651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1653) END FROM WidgetInst WHERE WidgetInstId = 1653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1654) END FROM WidgetInst WHERE WidgetInstId = 1654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1649) END FROM WidgetInst WHERE WidgetInstId = 1649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1650) END FROM WidgetInst WHERE WidgetInstId = 1650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1651) END FROM WidgetInst WHERE WidgetInstId = 1651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1653) END FROM WidgetInst WHERE WidgetInstId = 1653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1654) END FROM WidgetInst WHERE WidgetInstId = 1654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2015) END FROM WidgetInst WHERE WidgetInstId = 2015) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2016) END FROM WidgetInst WHERE WidgetInstId = 2016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2017) END FROM WidgetInst WHERE WidgetInstId = 2017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2018) END FROM WidgetInst WHERE WidgetInstId = 2018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2019) END FROM WidgetInst WHERE WidgetInstId = 2019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2020) END FROM WidgetInst WHERE WidgetInstId = 2020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2015) END FROM WidgetInst WHERE WidgetInstId = 2015) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2016) END FROM WidgetInst WHERE WidgetInstId = 2016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2017) END FROM WidgetInst WHERE WidgetInstId = 2017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2018) END FROM WidgetInst WHERE WidgetInstId = 2018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2019) END FROM WidgetInst WHERE WidgetInstId = 2019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2020) END FROM WidgetInst WHERE WidgetInstId = 2020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2015) END FROM WidgetInst WHERE WidgetInstId = 2015) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2016) END FROM WidgetInst WHERE WidgetInstId = 2016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2017) END FROM WidgetInst WHERE WidgetInstId = 2017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2018) END FROM WidgetInst WHERE WidgetInstId = 2018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2019) END FROM WidgetInst WHERE WidgetInstId = 2019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2020) END FROM WidgetInst WHERE WidgetInstId = 2020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2050;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2111) END FROM WidgetInst WHERE WidgetInstId = 2111) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2112) END FROM WidgetInst WHERE WidgetInstId = 2112) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2113) END FROM WidgetInst WHERE WidgetInstId = 2113) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2114) END FROM WidgetInst WHERE WidgetInstId = 2114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2115) END FROM WidgetInst WHERE WidgetInstId = 2115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2116) END FROM WidgetInst WHERE WidgetInstId = 2116) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2111) END FROM WidgetInst WHERE WidgetInstId = 2111) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2112) END FROM WidgetInst WHERE WidgetInstId = 2112) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2130;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2113) END FROM WidgetInst WHERE WidgetInstId = 2113) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2114) END FROM WidgetInst WHERE WidgetInstId = 2114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2115) END FROM WidgetInst WHERE WidgetInstId = 2115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2116) END FROM WidgetInst WHERE WidgetInstId = 2116) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2111) END FROM WidgetInst WHERE WidgetInstId = 2111) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2112) END FROM WidgetInst WHERE WidgetInstId = 2112) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2113) END FROM WidgetInst WHERE WidgetInstId = 2113) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2114) END FROM WidgetInst WHERE WidgetInstId = 2114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2115) END FROM WidgetInst WHERE WidgetInstId = 2115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2116) END FROM WidgetInst WHERE WidgetInstId = 2116) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2231) END FROM WidgetInst WHERE WidgetInstId = 2231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2232) END FROM WidgetInst WHERE WidgetInstId = 2232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2233) END FROM WidgetInst WHERE WidgetInstId = 2233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2234) END FROM WidgetInst WHERE WidgetInstId = 2234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2235) END FROM WidgetInst WHERE WidgetInstId = 2235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2236) END FROM WidgetInst WHERE WidgetInstId = 2236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2231) END FROM WidgetInst WHERE WidgetInstId = 2231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2232) END FROM WidgetInst WHERE WidgetInstId = 2232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2233) END FROM WidgetInst WHERE WidgetInstId = 2233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2234) END FROM WidgetInst WHERE WidgetInstId = 2234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2235) END FROM WidgetInst WHERE WidgetInstId = 2235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2236) END FROM WidgetInst WHERE WidgetInstId = 2236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2231) END FROM WidgetInst WHERE WidgetInstId = 2231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2232) END FROM WidgetInst WHERE WidgetInstId = 2232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2233) END FROM WidgetInst WHERE WidgetInstId = 2233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2234) END FROM WidgetInst WHERE WidgetInstId = 2234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2235) END FROM WidgetInst WHERE WidgetInstId = 2235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2236) END FROM WidgetInst WHERE WidgetInstId = 2236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2276;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2351) END FROM WidgetInst WHERE WidgetInstId = 2351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2352) END FROM WidgetInst WHERE WidgetInstId = 2352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2353) END FROM WidgetInst WHERE WidgetInstId = 2353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2354) END FROM WidgetInst WHERE WidgetInstId = 2354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2355) END FROM WidgetInst WHERE WidgetInstId = 2355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2356) END FROM WidgetInst WHERE WidgetInstId = 2356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2351) END FROM WidgetInst WHERE WidgetInstId = 2351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2369;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2352) END FROM WidgetInst WHERE WidgetInstId = 2352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2353) END FROM WidgetInst WHERE WidgetInstId = 2353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2354) END FROM WidgetInst WHERE WidgetInstId = 2354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2355) END FROM WidgetInst WHERE WidgetInstId = 2355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2356) END FROM WidgetInst WHERE WidgetInstId = 2356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2351) END FROM WidgetInst WHERE WidgetInstId = 2351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2352) END FROM WidgetInst WHERE WidgetInstId = 2352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2353) END FROM WidgetInst WHERE WidgetInstId = 2353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2354) END FROM WidgetInst WHERE WidgetInstId = 2354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2355) END FROM WidgetInst WHERE WidgetInstId = 2355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2356) END FROM WidgetInst WHERE WidgetInstId = 2356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2387) END FROM WidgetInst WHERE WidgetInstId = 2387) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2351) END FROM WidgetInst WHERE WidgetInstId = 2351)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2388) END FROM WidgetInst WHERE WidgetInstId = 2388) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2352) END FROM WidgetInst WHERE WidgetInstId = 2352)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2389) END FROM WidgetInst WHERE WidgetInstId = 2389) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2353) END FROM WidgetInst WHERE WidgetInstId = 2353)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2390) END FROM WidgetInst WHERE WidgetInstId = 2390) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2354) END FROM WidgetInst WHERE WidgetInstId = 2354)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2391) END FROM WidgetInst WHERE WidgetInstId = 2391) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2355) END FROM WidgetInst WHERE WidgetInstId = 2355)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2392) END FROM WidgetInst WHERE WidgetInstId = 2392) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2356) END FROM WidgetInst WHERE WidgetInstId = 2356)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2387) END FROM WidgetInst WHERE WidgetInstId = 2387) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2351) END FROM WidgetInst WHERE WidgetInstId = 2351)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2388) END FROM WidgetInst WHERE WidgetInstId = 2388) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2352) END FROM WidgetInst WHERE WidgetInstId = 2352)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2389) END FROM WidgetInst WHERE WidgetInstId = 2389) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2353) END FROM WidgetInst WHERE WidgetInstId = 2353)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2390) END FROM WidgetInst WHERE WidgetInstId = 2390) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2354) END FROM WidgetInst WHERE WidgetInstId = 2354)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2391) END FROM WidgetInst WHERE WidgetInstId = 2391) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2355) END FROM WidgetInst WHERE WidgetInstId = 2355)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2392) END FROM WidgetInst WHERE WidgetInstId = 2392) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2356) END FROM WidgetInst WHERE WidgetInstId = 2356)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2387) END FROM WidgetInst WHERE WidgetInstId = 2387) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2351) END FROM WidgetInst WHERE WidgetInstId = 2351)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2388) END FROM WidgetInst WHERE WidgetInstId = 2388) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2352) END FROM WidgetInst WHERE WidgetInstId = 2352)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2389) END FROM WidgetInst WHERE WidgetInstId = 2389) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2353) END FROM WidgetInst WHERE WidgetInstId = 2353)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2390) END FROM WidgetInst WHERE WidgetInstId = 2390) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2354) END FROM WidgetInst WHERE WidgetInstId = 2354)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2391) END FROM WidgetInst WHERE WidgetInstId = 2391) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2355) END FROM WidgetInst WHERE WidgetInstId = 2355)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2392) END FROM WidgetInst WHERE WidgetInstId = 2392) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2356) END FROM WidgetInst WHERE WidgetInstId = 2356)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2441) END FROM WidgetInst WHERE WidgetInstId = 2441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2442) END FROM WidgetInst WHERE WidgetInstId = 2442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2443) END FROM WidgetInst WHERE WidgetInstId = 2443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2444) END FROM WidgetInst WHERE WidgetInstId = 2444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2445) END FROM WidgetInst WHERE WidgetInstId = 2445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2446) END FROM WidgetInst WHERE WidgetInstId = 2446) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2441) END FROM WidgetInst WHERE WidgetInstId = 2441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2442) END FROM WidgetInst WHERE WidgetInstId = 2442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2443) END FROM WidgetInst WHERE WidgetInstId = 2443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2444) END FROM WidgetInst WHERE WidgetInstId = 2444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2445) END FROM WidgetInst WHERE WidgetInstId = 2445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2446) END FROM WidgetInst WHERE WidgetInstId = 2446) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2441) END FROM WidgetInst WHERE WidgetInstId = 2441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2442) END FROM WidgetInst WHERE WidgetInstId = 2442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2443) END FROM WidgetInst WHERE WidgetInstId = 2443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2444) END FROM WidgetInst WHERE WidgetInstId = 2444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2445) END FROM WidgetInst WHERE WidgetInstId = 2445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2446) END FROM WidgetInst WHERE WidgetInstId = 2446) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2441) END FROM WidgetInst WHERE WidgetInstId = 2441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2442) END FROM WidgetInst WHERE WidgetInstId = 2442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2443) END FROM WidgetInst WHERE WidgetInstId = 2443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2444) END FROM WidgetInst WHERE WidgetInstId = 2444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2445) END FROM WidgetInst WHERE WidgetInstId = 2445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2446) END FROM WidgetInst WHERE WidgetInstId = 2446) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2585) END FROM WidgetInst WHERE WidgetInstId = 2585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2586) END FROM WidgetInst WHERE WidgetInstId = 2586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2587) END FROM WidgetInst WHERE WidgetInstId = 2587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2588) END FROM WidgetInst WHERE WidgetInstId = 2588) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2589) END FROM WidgetInst WHERE WidgetInstId = 2589) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2590) END FROM WidgetInst WHERE WidgetInstId = 2590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2596;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2585) END FROM WidgetInst WHERE WidgetInstId = 2585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2586) END FROM WidgetInst WHERE WidgetInstId = 2586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2587) END FROM WidgetInst WHERE WidgetInstId = 2587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2588) END FROM WidgetInst WHERE WidgetInstId = 2588) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2589) END FROM WidgetInst WHERE WidgetInstId = 2589) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2590) END FROM WidgetInst WHERE WidgetInstId = 2590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2585) END FROM WidgetInst WHERE WidgetInstId = 2585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2586) END FROM WidgetInst WHERE WidgetInstId = 2586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2587) END FROM WidgetInst WHERE WidgetInstId = 2587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2588) END FROM WidgetInst WHERE WidgetInstId = 2588) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2589) END FROM WidgetInst WHERE WidgetInstId = 2589) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2590) END FROM WidgetInst WHERE WidgetInstId = 2590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2585) END FROM WidgetInst WHERE WidgetInstId = 2585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2693;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2586) END FROM WidgetInst WHERE WidgetInstId = 2586) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2694;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2587) END FROM WidgetInst WHERE WidgetInstId = 2587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2588) END FROM WidgetInst WHERE WidgetInstId = 2588) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2589) END FROM WidgetInst WHERE WidgetInstId = 2589) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2590) END FROM WidgetInst WHERE WidgetInstId = 2590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 2717) END FROM WidgetInst WHERE WidgetInstId = 2717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 2718) END FROM WidgetInst WHERE WidgetInstId = 2718) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2724;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 2719) END FROM WidgetInst WHERE WidgetInstId = 2719) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2725;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 2720) END FROM WidgetInst WHERE WidgetInstId = 2720) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 2721) END FROM WidgetInst WHERE WidgetInstId = 2721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 2722) END FROM WidgetInst WHERE WidgetInstId = 2722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2717) END FROM WidgetInst WHERE WidgetInstId = 2717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2718) END FROM WidgetInst WHERE WidgetInstId = 2718) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2736;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2719) END FROM WidgetInst WHERE WidgetInstId = 2719) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2737;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2720) END FROM WidgetInst WHERE WidgetInstId = 2720) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2738;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2721) END FROM WidgetInst WHERE WidgetInstId = 2721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2739;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2722) END FROM WidgetInst WHERE WidgetInstId = 2722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2717) END FROM WidgetInst WHERE WidgetInstId = 2717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2718) END FROM WidgetInst WHERE WidgetInstId = 2718) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2748;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2719) END FROM WidgetInst WHERE WidgetInstId = 2719) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2749;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2720) END FROM WidgetInst WHERE WidgetInstId = 2720) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2721) END FROM WidgetInst WHERE WidgetInstId = 2721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2722) END FROM WidgetInst WHERE WidgetInstId = 2722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2717) END FROM WidgetInst WHERE WidgetInstId = 2717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2718) END FROM WidgetInst WHERE WidgetInstId = 2718) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2719) END FROM WidgetInst WHERE WidgetInstId = 2719) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2720) END FROM WidgetInst WHERE WidgetInstId = 2720) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2721) END FROM WidgetInst WHERE WidgetInstId = 2721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2722) END FROM WidgetInst WHERE WidgetInstId = 2722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2717) END FROM WidgetInst WHERE WidgetInstId = 2717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2718) END FROM WidgetInst WHERE WidgetInstId = 2718) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2719) END FROM WidgetInst WHERE WidgetInstId = 2719) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2720) END FROM WidgetInst WHERE WidgetInstId = 2720) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2774;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2721) END FROM WidgetInst WHERE WidgetInstId = 2721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2722) END FROM WidgetInst WHERE WidgetInstId = 2722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2717) END FROM WidgetInst WHERE WidgetInstId = 2717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2718) END FROM WidgetInst WHERE WidgetInstId = 2718) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2719) END FROM WidgetInst WHERE WidgetInstId = 2719) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2720) END FROM WidgetInst WHERE WidgetInstId = 2720) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2721) END FROM WidgetInst WHERE WidgetInstId = 2721) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2722) END FROM WidgetInst WHERE WidgetInstId = 2722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1392) END FROM WidgetInst WHERE WidgetInstId = 1392) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1396) END FROM WidgetInst WHERE WidgetInstId = 1396) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 2807) END FROM WidgetInst WHERE WidgetInstId = 2807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2813;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 2808) END FROM WidgetInst WHERE WidgetInstId = 2808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 2809) END FROM WidgetInst WHERE WidgetInstId = 2809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 2810) END FROM WidgetInst WHERE WidgetInstId = 2810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 2811) END FROM WidgetInst WHERE WidgetInstId = 2811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 2812) END FROM WidgetInst WHERE WidgetInstId = 2812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2818;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2829;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2829;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2829;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2829;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2829;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2829;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2830;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2830;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2830;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2830;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2830;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2835) END FROM WidgetInst WHERE WidgetInstId = 2835) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2836) END FROM WidgetInst WHERE WidgetInstId = 2836) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2854;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 995) END FROM WidgetInst WHERE WidgetInstId = 995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2869) END FROM WidgetInst WHERE WidgetInstId = 2869) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2870) END FROM WidgetInst WHERE WidgetInstId = 2870) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2869) END FROM WidgetInst WHERE WidgetInstId = 2869) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2870) END FROM WidgetInst WHERE WidgetInstId = 2870) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2887) END FROM WidgetInst WHERE WidgetInstId = 2887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2889;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2888) END FROM WidgetInst WHERE WidgetInstId = 2888) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2887) END FROM WidgetInst WHERE WidgetInstId = 2887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2888) END FROM WidgetInst WHERE WidgetInstId = 2888) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2896;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2887) END FROM WidgetInst WHERE WidgetInstId = 2887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2901;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2888) END FROM WidgetInst WHERE WidgetInstId = 2888) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2902;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2907;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2908;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2911) END FROM WidgetInst WHERE WidgetInstId = 2911)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2912) END FROM WidgetInst WHERE WidgetInstId = 2912)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2915) END FROM WidgetInst WHERE WidgetInstId = 2915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2916) END FROM WidgetInst WHERE WidgetInstId = 2916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2915) END FROM WidgetInst WHERE WidgetInstId = 2915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2916) END FROM WidgetInst WHERE WidgetInstId = 2916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2915) END FROM WidgetInst WHERE WidgetInstId = 2915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2916) END FROM WidgetInst WHERE WidgetInstId = 2916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2915) END FROM WidgetInst WHERE WidgetInstId = 2915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2916) END FROM WidgetInst WHERE WidgetInstId = 2916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2911) END FROM WidgetInst WHERE WidgetInstId = 2911)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2912) END FROM WidgetInst WHERE WidgetInstId = 2912)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2915) END FROM WidgetInst WHERE WidgetInstId = 2915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2916) END FROM WidgetInst WHERE WidgetInstId = 2916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2915) END FROM WidgetInst WHERE WidgetInstId = 2915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2916) END FROM WidgetInst WHERE WidgetInstId = 2916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2944;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2947) END FROM WidgetInst WHERE WidgetInstId = 2947) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2948) END FROM WidgetInst WHERE WidgetInstId = 2948) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2915) END FROM WidgetInst WHERE WidgetInstId = 2915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2916) END FROM WidgetInst WHERE WidgetInstId = 2916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2915) END FROM WidgetInst WHERE WidgetInstId = 2915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2916) END FROM WidgetInst WHERE WidgetInstId = 2916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2947) END FROM WidgetInst WHERE WidgetInstId = 2947) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2948) END FROM WidgetInst WHERE WidgetInstId = 2948) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2915) END FROM WidgetInst WHERE WidgetInstId = 2915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2961;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2916) END FROM WidgetInst WHERE WidgetInstId = 2916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2915) END FROM WidgetInst WHERE WidgetInstId = 2915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2916) END FROM WidgetInst WHERE WidgetInstId = 2916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3037) END FROM WidgetInst WHERE WidgetInstId = 3037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3038) END FROM WidgetInst WHERE WidgetInstId = 3038) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3037) END FROM WidgetInst WHERE WidgetInstId = 3037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3038) END FROM WidgetInst WHERE WidgetInstId = 3038) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3044;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3037) END FROM WidgetInst WHERE WidgetInstId = 3037) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3038) END FROM WidgetInst WHERE WidgetInstId = 3038) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3052;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3069) END FROM WidgetInst WHERE WidgetInstId = 3069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3070) END FROM WidgetInst WHERE WidgetInstId = 3070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3069) END FROM WidgetInst WHERE WidgetInstId = 3069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3070) END FROM WidgetInst WHERE WidgetInstId = 3070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3069) END FROM WidgetInst WHERE WidgetInstId = 3069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3070) END FROM WidgetInst WHERE WidgetInstId = 3070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3109) END FROM WidgetInst WHERE WidgetInstId = 3109) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3110) END FROM WidgetInst WHERE WidgetInstId = 3110) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3109) END FROM WidgetInst WHERE WidgetInstId = 3109) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3110) END FROM WidgetInst WHERE WidgetInstId = 3110) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3109) END FROM WidgetInst WHERE WidgetInstId = 3109) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3110) END FROM WidgetInst WHERE WidgetInstId = 3110) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3123;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3124;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3149) END FROM WidgetInst WHERE WidgetInstId = 3149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3150) END FROM WidgetInst WHERE WidgetInstId = 3150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3149) END FROM WidgetInst WHERE WidgetInstId = 3149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3150) END FROM WidgetInst WHERE WidgetInstId = 3150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3149) END FROM WidgetInst WHERE WidgetInstId = 3149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3150) END FROM WidgetInst WHERE WidgetInstId = 3150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3161) END FROM WidgetInst WHERE WidgetInstId = 3161) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3149) END FROM WidgetInst WHERE WidgetInstId = 3149)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3150) END FROM WidgetInst WHERE WidgetInstId = 3150)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3161) END FROM WidgetInst WHERE WidgetInstId = 3161) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3149) END FROM WidgetInst WHERE WidgetInstId = 3149)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3150) END FROM WidgetInst WHERE WidgetInstId = 3150)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3161) END FROM WidgetInst WHERE WidgetInstId = 3161) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3149) END FROM WidgetInst WHERE WidgetInstId = 3149)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3150) END FROM WidgetInst WHERE WidgetInstId = 3150)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3179) END FROM WidgetInst WHERE WidgetInstId = 3179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3180) END FROM WidgetInst WHERE WidgetInstId = 3180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3179) END FROM WidgetInst WHERE WidgetInstId = 3179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3180) END FROM WidgetInst WHERE WidgetInstId = 3180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3179) END FROM WidgetInst WHERE WidgetInstId = 3179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3180) END FROM WidgetInst WHERE WidgetInstId = 3180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3179) END FROM WidgetInst WHERE WidgetInstId = 3179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3180) END FROM WidgetInst WHERE WidgetInstId = 3180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3222;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3227) END FROM WidgetInst WHERE WidgetInstId = 3227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3228) END FROM WidgetInst WHERE WidgetInstId = 3228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3227) END FROM WidgetInst WHERE WidgetInstId = 3227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3228) END FROM WidgetInst WHERE WidgetInstId = 3228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3227) END FROM WidgetInst WHERE WidgetInstId = 3227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3228) END FROM WidgetInst WHERE WidgetInstId = 3228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3227) END FROM WidgetInst WHERE WidgetInstId = 3227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3228) END FROM WidgetInst WHERE WidgetInstId = 3228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 3271) END FROM WidgetInst WHERE WidgetInstId = 3271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 3272) END FROM WidgetInst WHERE WidgetInstId = 3272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3271) END FROM WidgetInst WHERE WidgetInstId = 3271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3272) END FROM WidgetInst WHERE WidgetInstId = 3272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3271) END FROM WidgetInst WHERE WidgetInstId = 3271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3272) END FROM WidgetInst WHERE WidgetInstId = 3272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3271) END FROM WidgetInst WHERE WidgetInstId = 3271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3272) END FROM WidgetInst WHERE WidgetInstId = 3272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3286;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3271) END FROM WidgetInst WHERE WidgetInstId = 3271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3272) END FROM WidgetInst WHERE WidgetInstId = 3272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3271) END FROM WidgetInst WHERE WidgetInstId = 3271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3272) END FROM WidgetInst WHERE WidgetInstId = 3272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2829) END FROM WidgetInst WHERE WidgetInstId = 2829) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2830) END FROM WidgetInst WHERE WidgetInstId = 2830) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 3301) END FROM WidgetInst WHERE WidgetInstId = 3301) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3356) END FROM WidgetInst WHERE WidgetInstId = 3356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3356) END FROM WidgetInst WHERE WidgetInstId = 3356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3366) END FROM WidgetInst WHERE WidgetInstId = 3366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3367) END FROM WidgetInst WHERE WidgetInstId = 3367) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3368) END FROM WidgetInst WHERE WidgetInstId = 3368) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3369) END FROM WidgetInst WHERE WidgetInstId = 3369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3370) END FROM WidgetInst WHERE WidgetInstId = 3370) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3366) END FROM WidgetInst WHERE WidgetInstId = 3366) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3367) END FROM WidgetInst WHERE WidgetInstId = 3367) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3368) END FROM WidgetInst WHERE WidgetInstId = 3368) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3369) END FROM WidgetInst WHERE WidgetInstId = 3369) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3370) END FROM WidgetInst WHERE WidgetInstId = 3370) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 3395) END FROM WidgetInst WHERE WidgetInstId = 3395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 3395) END FROM WidgetInst WHERE WidgetInstId = 3395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 3408) END FROM WidgetInst WHERE WidgetInstId = 3408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 3410) END FROM WidgetInst WHERE WidgetInstId = 3410) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 3408) END FROM WidgetInst WHERE WidgetInstId = 3408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 3410) END FROM WidgetInst WHERE WidgetInstId = 3410) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 3408) END FROM WidgetInst WHERE WidgetInstId = 3408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 3410) END FROM WidgetInst WHERE WidgetInstId = 3410) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 3408) END FROM WidgetInst WHERE WidgetInstId = 3408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 3410) END FROM WidgetInst WHERE WidgetInstId = 3410) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 3408) END FROM WidgetInst WHERE WidgetInstId = 3408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 3410) END FROM WidgetInst WHERE WidgetInstId = 3410) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 3408) END FROM WidgetInst WHERE WidgetInstId = 3408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 3410) END FROM WidgetInst WHERE WidgetInstId = 3410) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 3408) END FROM WidgetInst WHERE WidgetInstId = 3408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 3410) END FROM WidgetInst WHERE WidgetInstId = 3410) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 3403) END FROM WidgetInst WHERE WidgetInstId = 3403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 3487) END FROM WidgetInst WHERE WidgetInstId = 3487) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 3497) END FROM WidgetInst WHERE WidgetInstId = 3497) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 3500) END FROM WidgetInst WHERE WidgetInstId = 3500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 3505) END FROM WidgetInst WHERE WidgetInstId = 3505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 3505) END FROM WidgetInst WHERE WidgetInstId = 3505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 3497) END FROM WidgetInst WHERE WidgetInstId = 3497) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3523;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 3537;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 3537;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 3537;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 3537;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 3537;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 3537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 3540) END FROM WidgetInst WHERE WidgetInstId = 3540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3566) END FROM WidgetInst WHERE WidgetInstId = 3566) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3566) END FROM WidgetInst WHERE WidgetInstId = 3566) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3566) END FROM WidgetInst WHERE WidgetInstId = 3566) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3578) END FROM WidgetInst WHERE WidgetInstId = 3578)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3578) END FROM WidgetInst WHERE WidgetInstId = 3578)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3596) END FROM WidgetInst WHERE WidgetInstId = 3596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3600;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3596) END FROM WidgetInst WHERE WidgetInstId = 3596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3641) END FROM WidgetInst WHERE WidgetInstId = 3641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3641) END FROM WidgetInst WHERE WidgetInstId = 3641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3641) END FROM WidgetInst WHERE WidgetInstId = 3641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3657) END FROM WidgetInst WHERE WidgetInstId = 3657) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3657) END FROM WidgetInst WHERE WidgetInstId = 3657) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3657) END FROM WidgetInst WHERE WidgetInstId = 3657) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3664;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3677) END FROM WidgetInst WHERE WidgetInstId = 3677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3677) END FROM WidgetInst WHERE WidgetInstId = 3677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3677) END FROM WidgetInst WHERE WidgetInstId = 3677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3697) END FROM WidgetInst WHERE WidgetInstId = 3697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3697) END FROM WidgetInst WHERE WidgetInstId = 3697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3697) END FROM WidgetInst WHERE WidgetInstId = 3697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3702;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3703) END FROM WidgetInst WHERE WidgetInstId = 3703) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3697) END FROM WidgetInst WHERE WidgetInstId = 3697)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3703) END FROM WidgetInst WHERE WidgetInstId = 3703) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3697) END FROM WidgetInst WHERE WidgetInstId = 3697)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3703) END FROM WidgetInst WHERE WidgetInstId = 3703) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3697) END FROM WidgetInst WHERE WidgetInstId = 3697)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3708;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3710;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3712) END FROM WidgetInst WHERE WidgetInstId = 3712) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3712) END FROM WidgetInst WHERE WidgetInstId = 3712) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3712) END FROM WidgetInst WHERE WidgetInstId = 3712) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3712) END FROM WidgetInst WHERE WidgetInstId = 3712) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 3537) END FROM WidgetInst WHERE WidgetInstId = 3537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3736) END FROM WidgetInst WHERE WidgetInstId = 3736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3737;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3736) END FROM WidgetInst WHERE WidgetInstId = 3736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3736) END FROM WidgetInst WHERE WidgetInstId = 3736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3736) END FROM WidgetInst WHERE WidgetInstId = 3736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 3758) END FROM WidgetInst WHERE WidgetInstId = 3758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3758) END FROM WidgetInst WHERE WidgetInstId = 3758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3758) END FROM WidgetInst WHERE WidgetInstId = 3758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3758) END FROM WidgetInst WHERE WidgetInstId = 3758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3758) END FROM WidgetInst WHERE WidgetInstId = 3758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3758) END FROM WidgetInst WHERE WidgetInstId = 3758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 3773) END FROM WidgetInst WHERE WidgetInstId = 3773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3774;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 3780;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 3780;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 3780;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 3780;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 3780;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 3780;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 3781;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 3781;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 3781;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 3781;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 3781;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 3781;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 3786) END FROM WidgetInst WHERE WidgetInstId = 3786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 3787) END FROM WidgetInst WHERE WidgetInstId = 3787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3820) END FROM WidgetInst WHERE WidgetInstId = 3820) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3821) END FROM WidgetInst WHERE WidgetInstId = 3821) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3820) END FROM WidgetInst WHERE WidgetInstId = 3820) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3821) END FROM WidgetInst WHERE WidgetInstId = 3821) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3838) END FROM WidgetInst WHERE WidgetInstId = 3838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3839) END FROM WidgetInst WHERE WidgetInstId = 3839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3838) END FROM WidgetInst WHERE WidgetInstId = 3838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3839) END FROM WidgetInst WHERE WidgetInstId = 3839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3838) END FROM WidgetInst WHERE WidgetInstId = 3838) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3839) END FROM WidgetInst WHERE WidgetInstId = 3839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3863) END FROM WidgetInst WHERE WidgetInstId = 3863)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3863) END FROM WidgetInst WHERE WidgetInstId = 3863)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3887;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3898) END FROM WidgetInst WHERE WidgetInstId = 3898) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3899) END FROM WidgetInst WHERE WidgetInstId = 3899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3901;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3907;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3898) END FROM WidgetInst WHERE WidgetInstId = 3898) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3908;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3899) END FROM WidgetInst WHERE WidgetInstId = 3899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3909;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3988) END FROM WidgetInst WHERE WidgetInstId = 3988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3989) END FROM WidgetInst WHERE WidgetInstId = 3989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3988) END FROM WidgetInst WHERE WidgetInstId = 3988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3989) END FROM WidgetInst WHERE WidgetInstId = 3989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3988) END FROM WidgetInst WHERE WidgetInstId = 3988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3989) END FROM WidgetInst WHERE WidgetInstId = 3989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4020) END FROM WidgetInst WHERE WidgetInstId = 4020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4021) END FROM WidgetInst WHERE WidgetInstId = 4021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4020) END FROM WidgetInst WHERE WidgetInstId = 4020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4021) END FROM WidgetInst WHERE WidgetInstId = 4021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4020) END FROM WidgetInst WHERE WidgetInstId = 4020) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4021) END FROM WidgetInst WHERE WidgetInstId = 4021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4060) END FROM WidgetInst WHERE WidgetInstId = 4060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4061) END FROM WidgetInst WHERE WidgetInstId = 4061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4060) END FROM WidgetInst WHERE WidgetInstId = 4060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4061) END FROM WidgetInst WHERE WidgetInstId = 4061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4060) END FROM WidgetInst WHERE WidgetInstId = 4060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4061) END FROM WidgetInst WHERE WidgetInstId = 4061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4100) END FROM WidgetInst WHERE WidgetInstId = 4100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4101) END FROM WidgetInst WHERE WidgetInstId = 4101) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4100) END FROM WidgetInst WHERE WidgetInstId = 4100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4101) END FROM WidgetInst WHERE WidgetInstId = 4101) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4100) END FROM WidgetInst WHERE WidgetInstId = 4100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4101) END FROM WidgetInst WHERE WidgetInstId = 4101) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4112) END FROM WidgetInst WHERE WidgetInstId = 4112) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4100) END FROM WidgetInst WHERE WidgetInstId = 4100)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4113) END FROM WidgetInst WHERE WidgetInstId = 4113) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4101) END FROM WidgetInst WHERE WidgetInstId = 4101)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4112) END FROM WidgetInst WHERE WidgetInstId = 4112) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4100) END FROM WidgetInst WHERE WidgetInstId = 4100)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4113) END FROM WidgetInst WHERE WidgetInstId = 4113) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4101) END FROM WidgetInst WHERE WidgetInstId = 4101)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4112) END FROM WidgetInst WHERE WidgetInstId = 4112) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4100) END FROM WidgetInst WHERE WidgetInstId = 4100)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4113) END FROM WidgetInst WHERE WidgetInstId = 4113) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4101) END FROM WidgetInst WHERE WidgetInstId = 4101)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4123;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4130) END FROM WidgetInst WHERE WidgetInstId = 4130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4131) END FROM WidgetInst WHERE WidgetInstId = 4131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4130) END FROM WidgetInst WHERE WidgetInstId = 4130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4131) END FROM WidgetInst WHERE WidgetInstId = 4131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4130) END FROM WidgetInst WHERE WidgetInstId = 4130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4131) END FROM WidgetInst WHERE WidgetInstId = 4131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4130) END FROM WidgetInst WHERE WidgetInstId = 4130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4131) END FROM WidgetInst WHERE WidgetInstId = 4131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4178) END FROM WidgetInst WHERE WidgetInstId = 4178) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4179) END FROM WidgetInst WHERE WidgetInstId = 4179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4178) END FROM WidgetInst WHERE WidgetInstId = 4178) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4179) END FROM WidgetInst WHERE WidgetInstId = 4179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4178) END FROM WidgetInst WHERE WidgetInstId = 4178) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4179) END FROM WidgetInst WHERE WidgetInstId = 4179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4178) END FROM WidgetInst WHERE WidgetInstId = 4178) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4179) END FROM WidgetInst WHERE WidgetInstId = 4179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4222) END FROM WidgetInst WHERE WidgetInstId = 4222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4223) END FROM WidgetInst WHERE WidgetInstId = 4223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4222) END FROM WidgetInst WHERE WidgetInstId = 4222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4223) END FROM WidgetInst WHERE WidgetInstId = 4223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4222) END FROM WidgetInst WHERE WidgetInstId = 4222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4223) END FROM WidgetInst WHERE WidgetInstId = 4223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4222) END FROM WidgetInst WHERE WidgetInstId = 4222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4223) END FROM WidgetInst WHERE WidgetInstId = 4223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4222) END FROM WidgetInst WHERE WidgetInstId = 4222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4223) END FROM WidgetInst WHERE WidgetInstId = 4223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4222) END FROM WidgetInst WHERE WidgetInstId = 4222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4223) END FROM WidgetInst WHERE WidgetInstId = 4223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3780) END FROM WidgetInst WHERE WidgetInstId = 3780) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 3395) END FROM WidgetInst WHERE WidgetInstId = 3395)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3781) END FROM WidgetInst WHERE WidgetInstId = 3781) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 3395) END FROM WidgetInst WHERE WidgetInstId = 3395)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4252) END FROM WidgetInst WHERE WidgetInstId = 4252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4253) END FROM WidgetInst WHERE WidgetInstId = 4253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4259) END FROM WidgetInst WHERE WidgetInstId = 4259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 4259) END FROM WidgetInst WHERE WidgetInstId = 4259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4268) END FROM WidgetInst WHERE WidgetInstId = 4268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4269) END FROM WidgetInst WHERE WidgetInstId = 4269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4270) END FROM WidgetInst WHERE WidgetInstId = 4270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4271) END FROM WidgetInst WHERE WidgetInstId = 4271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 4268) END FROM WidgetInst WHERE WidgetInstId = 4268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 4269) END FROM WidgetInst WHERE WidgetInstId = 4269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 4270) END FROM WidgetInst WHERE WidgetInstId = 4270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 4271) END FROM WidgetInst WHERE WidgetInstId = 4271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4289) END FROM WidgetInst WHERE WidgetInstId = 4289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 4289) END FROM WidgetInst WHERE WidgetInstId = 4289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4298) END FROM WidgetInst WHERE WidgetInstId = 4298) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4302;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4299) END FROM WidgetInst WHERE WidgetInstId = 4299) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4300) END FROM WidgetInst WHERE WidgetInstId = 4300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4301) END FROM WidgetInst WHERE WidgetInstId = 4301) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 4298) END FROM WidgetInst WHERE WidgetInstId = 4298) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 4299) END FROM WidgetInst WHERE WidgetInstId = 4299) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 4300) END FROM WidgetInst WHERE WidgetInstId = 4300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 4301) END FROM WidgetInst WHERE WidgetInstId = 4301) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 4322) END FROM WidgetInst WHERE WidgetInstId = 4322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4322) END FROM WidgetInst WHERE WidgetInstId = 4322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 4337) END FROM WidgetInst WHERE WidgetInstId = 4337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 4337) END FROM WidgetInst WHERE WidgetInstId = 4337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4351;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 4337) END FROM WidgetInst WHERE WidgetInstId = 4337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4355;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 4337) END FROM WidgetInst WHERE WidgetInstId = 4337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 4337) END FROM WidgetInst WHERE WidgetInstId = 4337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4369;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 4337) END FROM WidgetInst WHERE WidgetInstId = 4337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 4337) END FROM WidgetInst WHERE WidgetInstId = 4337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 4330) END FROM WidgetInst WHERE WidgetInstId = 4330) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 4414) END FROM WidgetInst WHERE WidgetInstId = 4414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 4424) END FROM WidgetInst WHERE WidgetInstId = 4424) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 4427) END FROM WidgetInst WHERE WidgetInstId = 4427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 4432) END FROM WidgetInst WHERE WidgetInstId = 4432) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 4432) END FROM WidgetInst WHERE WidgetInstId = 4432) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 4424) END FROM WidgetInst WHERE WidgetInstId = 4424) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4450;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 180)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 4464;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 180)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 4464;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 180)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 4464;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 180)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 4464;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 180)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 4464;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 180)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 4464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 4464) END FROM WidgetInst WHERE WidgetInstId = 4464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 4467) END FROM WidgetInst WHERE WidgetInstId = 4467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 4464) END FROM WidgetInst WHERE WidgetInstId = 4464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4479;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 4464) END FROM WidgetInst WHERE WidgetInstId = 4464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4484) END FROM WidgetInst WHERE WidgetInstId = 4484) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4484) END FROM WidgetInst WHERE WidgetInstId = 4484) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 4464) END FROM WidgetInst WHERE WidgetInstId = 4464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4493) END FROM WidgetInst WHERE WidgetInstId = 4493) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4494;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4493) END FROM WidgetInst WHERE WidgetInstId = 4493) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4497;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4493) END FROM WidgetInst WHERE WidgetInstId = 4493) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4500;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4464) END FROM WidgetInst WHERE WidgetInstId = 4464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4464) END FROM WidgetInst WHERE WidgetInstId = 4464) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4505) END FROM WidgetInst WHERE WidgetInstId = 4505)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4507) END FROM WidgetInst WHERE WidgetInstId = 4507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4507) END FROM WidgetInst WHERE WidgetInstId = 4507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4507) END FROM WidgetInst WHERE WidgetInstId = 4507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4507) END FROM WidgetInst WHERE WidgetInstId = 4507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4464) END FROM WidgetInst WHERE WidgetInstId = 4464) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4505) END FROM WidgetInst WHERE WidgetInstId = 4505)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4507) END FROM WidgetInst WHERE WidgetInstId = 4507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4520;


