# 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 = 12) END FROM WidgetInst WHERE WidgetInstId = 12) = 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 = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 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 = 'Constant' AND WidgetInstId = 14) END FROM WidgetInst WHERE WidgetInstId = 14) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19;


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 = 15) END FROM WidgetInst WHERE WidgetInstId = 15) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20;


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 = 16) END FROM WidgetInst WHERE WidgetInstId = 16) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 21;


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 = 27;


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 = 28;


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 = 29;


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 = 15) END FROM WidgetInst WHERE WidgetInstId = 15) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 30;


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 = 16) END FROM WidgetInst WHERE WidgetInstId = 16) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 31;


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 = 41) END FROM WidgetInst WHERE WidgetInstId = 41) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 42;


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 = 41) END FROM WidgetInst WHERE WidgetInstId = 41) = 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 = 'Mixed' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 50;


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 = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 54) END FROM WidgetInst WHERE WidgetInstId = 54) = 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 = 56) END FROM WidgetInst WHERE WidgetInstId = 56) = 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 = 'Parker' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'Parker' AND WidgetInstId = 54) END FROM WidgetInst WHERE WidgetInstId = 54) = 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 = 'Parker' AND WidgetInstId = 56) END FROM WidgetInst WHERE WidgetInstId = 56) = 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 = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 54) END FROM WidgetInst WHERE WidgetInstId = 54) = 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 = 56) END FROM WidgetInst WHERE WidgetInstId = 56) = 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 = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 54) END FROM WidgetInst WHERE WidgetInstId = 54) = 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 = 56) END FROM WidgetInst WHERE WidgetInstId = 56) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 54) END FROM WidgetInst WHERE WidgetInstId = 54) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 56) END FROM WidgetInst WHERE WidgetInstId = 56) = 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 = 'Wu-et-al' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'Wu-et-al' AND WidgetInstId = 54) END FROM WidgetInst WHERE WidgetInstId = 54) = 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 = 'Wu-et-al' AND WidgetInstId = 56) END FROM WidgetInst WHERE WidgetInstId = 56) = 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 = 'Meyer-Peter-Muller' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'Meyer-Peter-Muller' AND WidgetInstId = 54) END FROM WidgetInst WHERE WidgetInstId = 54) = 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 = 'Meyer-Peter-Muller' AND WidgetInstId = 56) END FROM WidgetInst WHERE WidgetInstId = 56) = 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 = 'Trinity' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'Trinity' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'Trinity' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'Aw' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'Rijn' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'Seminara' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'Seminara' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 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 = 'User defined' AND WidgetInstId = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 116;


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 = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 118;


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 = 49) END FROM WidgetInst WHERE WidgetInstId = 49) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 120;


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 = 133) END FROM WidgetInst WHERE WidgetInstId = 133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 134;


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 = 143) END FROM WidgetInst WHERE WidgetInstId = 143) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 144;


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 = 146) END FROM WidgetInst WHERE WidgetInstId = 146) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 147;


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 = 151) END FROM WidgetInst WHERE WidgetInstId = 151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 152;


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 = 151) END FROM WidgetInst WHERE WidgetInstId = 151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 154;


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 = 143) END FROM WidgetInst WHERE WidgetInstId = 143) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 169;


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 55)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 184;


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 = 186) END FROM WidgetInst WHERE WidgetInstId = 186) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 187;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 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 = '(none selected)' AND WidgetInstId = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 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 = 'Constant' AND WidgetInstId = 203) END FROM WidgetInst WHERE WidgetInstId = 203) = 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 = 'Time Series' AND WidgetInstId = 203) END FROM WidgetInst WHERE WidgetInstId = 203) = 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 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 = 'Constant' AND WidgetInstId = 212) END FROM WidgetInst WHERE WidgetInstId = 212) = 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 = 'Time Series' AND WidgetInstId = 212) END FROM WidgetInst WHERE WidgetInstId = 212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 216;


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 = 212) END FROM WidgetInst WHERE WidgetInstId = 212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 219;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 222;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 224) END FROM WidgetInst WHERE WidgetInstId = 224)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 227;


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 = 226) END FROM WidgetInst WHERE WidgetInstId = 226) = 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 = 'Metric' AND WidgetInstId = 226) END FROM WidgetInst WHERE WidgetInstId = 226) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 231;


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 = 226) END FROM WidgetInst WHERE WidgetInstId = 226) = 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 = 'Metric' AND WidgetInstId = 226) END FROM WidgetInst WHERE WidgetInstId = 226) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 235;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 224) END FROM WidgetInst WHERE WidgetInstId = 224)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 236;


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 = 226) END FROM WidgetInst WHERE WidgetInstId = 226) = 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 = 226) END FROM WidgetInst WHERE WidgetInstId = 226) = 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 = 'Time Series' AND WidgetInstId = 242) END FROM WidgetInst WHERE WidgetInstId = 242) = 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 = 'U.S. Customary' AND WidgetInstId = 226) END FROM WidgetInst WHERE WidgetInstId = 226) = 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 = 'Metric' AND WidgetInstId = 226) END FROM WidgetInst WHERE WidgetInstId = 226) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 246;


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 = 242) END FROM WidgetInst WHERE WidgetInstId = 242) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 247;


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 = 226) END FROM WidgetInst WHERE WidgetInstId = 226) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 249;


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 = 226) END FROM WidgetInst WHERE WidgetInstId = 226) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 250;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 251;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 254;


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 = 287) END FROM WidgetInst WHERE WidgetInstId = 287) = 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 = 287) END FROM WidgetInst WHERE WidgetInstId = 287) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 290;


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 = 287) END FROM WidgetInst WHERE WidgetInstId = 287) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 292;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 294;


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 = 303) END FROM WidgetInst WHERE WidgetInstId = 303) = 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 = 303) END FROM WidgetInst WHERE WidgetInstId = 303) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 306;


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 = 303) END FROM WidgetInst WHERE WidgetInstId = 303) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 308;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 310;


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 = 323) END FROM WidgetInst WHERE WidgetInstId = 323) = 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 TextValues WHERE Value = 'user' AND WidgetInstId = 323) END FROM WidgetInst WHERE WidgetInstId = 323) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 326;


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 = 323) END FROM WidgetInst WHERE WidgetInstId = 323) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 328;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 330;


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 = 343) END FROM WidgetInst WHERE WidgetInstId = 343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 344;


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 = 343) END FROM WidgetInst WHERE WidgetInstId = 343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 346;


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 = 343) END FROM WidgetInst WHERE WidgetInstId = 343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 348;


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 = 349) END FROM WidgetInst WHERE WidgetInstId = 349) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 343) END FROM WidgetInst WHERE WidgetInstId = 343)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 350;


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 = 349) END FROM WidgetInst WHERE WidgetInstId = 349) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 343) END FROM WidgetInst WHERE WidgetInstId = 343)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 352;


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 = 349) END FROM WidgetInst WHERE WidgetInstId = 349) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 343) END FROM WidgetInst WHERE WidgetInstId = 343)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 354;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 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 = 'Constant' AND WidgetInstId = 358) END FROM WidgetInst WHERE WidgetInstId = 358) = 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 = 'Time Series' AND WidgetInstId = 358) END FROM WidgetInst WHERE WidgetInstId = 358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 362;


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 = 358) END FROM WidgetInst WHERE WidgetInstId = 358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 365;


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 = 358) END FROM WidgetInst WHERE WidgetInstId = 358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 376;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 379;


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 = 382) END FROM WidgetInst WHERE WidgetInstId = 382) = 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 = 'Time Series' AND WidgetInstId = 382) END FROM WidgetInst WHERE WidgetInstId = 382) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 386;


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 = 382) END FROM WidgetInst WHERE WidgetInstId = 382) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 389;


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 = 382) END FROM WidgetInst WHERE WidgetInstId = 382) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 400;


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 = 404) END FROM WidgetInst WHERE WidgetInstId = 404) = 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 = 404) END FROM WidgetInst WHERE WidgetInstId = 404) = 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 = 404) END FROM WidgetInst WHERE WidgetInstId = 404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 409;


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 = 404) END FROM WidgetInst WHERE WidgetInstId = 404) = 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 = 'Computed' AND WidgetInstId = 404) END FROM WidgetInst WHERE WidgetInstId = 404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 413;


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 = 404) END FROM WidgetInst WHERE WidgetInstId = 404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 415;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 41) END FROM WidgetInst WHERE WidgetInstId = 41)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 417;


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 = 419) END FROM WidgetInst WHERE WidgetInstId = 419) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 420;


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


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


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


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


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


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


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


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


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


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


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


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


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 434;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 435;


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 = 442) END FROM WidgetInst WHERE WidgetInstId = 442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 446;


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 = 443) END FROM WidgetInst WHERE WidgetInstId = 443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 447;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 454;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 455;


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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 478;


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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 479;


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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 490;


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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 491;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 502;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 503;


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 = 510) END FROM WidgetInst WHERE WidgetInstId = 510) = 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 = 'Constant' AND WidgetInstId = 511) END FROM WidgetInst WHERE WidgetInstId = 511) = 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 = 'Time Series' AND WidgetInstId = 510) END FROM WidgetInst WHERE WidgetInstId = 510) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 526;


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 = 511) END FROM WidgetInst WHERE WidgetInstId = 511) = 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 538;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 539;


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 = 546) END FROM WidgetInst WHERE WidgetInstId = 546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 550;


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 = 547) END FROM WidgetInst WHERE WidgetInstId = 547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 551;


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 = 546) END FROM WidgetInst WHERE WidgetInstId = 546) = 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 = 'Time Series' AND WidgetInstId = 547) END FROM WidgetInst WHERE WidgetInstId = 547) = 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 = 'Rating Curve' AND WidgetInstId = 546) END FROM WidgetInst WHERE WidgetInstId = 546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 574;


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 = 547) END FROM WidgetInst WHERE WidgetInstId = 547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 575;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 586;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 587;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 594) END FROM WidgetInst WHERE WidgetInstId = 594)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 606;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 595) END FROM WidgetInst WHERE WidgetInstId = 595)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 607;


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 = 602) END FROM WidgetInst WHERE WidgetInstId = 602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 618;


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 = 603) END FROM WidgetInst WHERE WidgetInstId = 603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 619;


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 = 602) END FROM WidgetInst WHERE WidgetInstId = 602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 622;


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 = 603) END FROM WidgetInst WHERE WidgetInstId = 603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 623;


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 = 602) END FROM WidgetInst WHERE WidgetInstId = 602) = 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 = 'U.S. Customary' AND WidgetInstId = 603) END FROM WidgetInst WHERE WidgetInstId = 603) = 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 = 'Metric' AND WidgetInstId = 602) END FROM WidgetInst WHERE WidgetInstId = 602) = 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 = 'Metric' AND WidgetInstId = 603) END FROM WidgetInst WHERE WidgetInstId = 603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 639;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 594) END FROM WidgetInst WHERE WidgetInstId = 594)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 642;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 595) END FROM WidgetInst WHERE WidgetInstId = 595)) = 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 = 'U.S. Customary' AND WidgetInstId = 602) END FROM WidgetInst WHERE WidgetInstId = 602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 654;


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 = 603) END FROM WidgetInst WHERE WidgetInstId = 603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 655;


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 = 602) END FROM WidgetInst WHERE WidgetInstId = 602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 658;


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 = 603) END FROM WidgetInst WHERE WidgetInstId = 603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 659;


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 = 666) END FROM WidgetInst WHERE WidgetInstId = 666) = 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 = 'Time Series' AND WidgetInstId = 667) END FROM WidgetInst WHERE WidgetInstId = 667) = 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 = 'U.S. Customary' AND WidgetInstId = 602) END FROM WidgetInst WHERE WidgetInstId = 602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 678;


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 = 603) END FROM WidgetInst WHERE WidgetInstId = 603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 679;


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 = 602) END FROM WidgetInst WHERE WidgetInstId = 602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 682;


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 = 603) END FROM WidgetInst WHERE WidgetInstId = 603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 683;


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 = 666) END FROM WidgetInst WHERE WidgetInstId = 666) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 686;


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 = 667) END FROM WidgetInst WHERE WidgetInstId = 667) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 687;


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 = 602) END FROM WidgetInst WHERE WidgetInstId = 602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 694;


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 = 603) END FROM WidgetInst WHERE WidgetInstId = 603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 695;


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 = 602) END FROM WidgetInst WHERE WidgetInstId = 602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 698;


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 = 603) END FROM WidgetInst WHERE WidgetInstId = 603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 699;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 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 = 'Culvert' AND WidgetInstId = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 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 = 'Culvert' AND WidgetInstId = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 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 TextValues WHERE Value = 'user' AND WidgetInstId = 846) END FROM WidgetInst WHERE WidgetInstId = 846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 850;


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 = 847) END FROM WidgetInst WHERE WidgetInstId = 847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 851;


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 = 846) END FROM WidgetInst WHERE WidgetInstId = 846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 858;


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 = 847) END FROM WidgetInst WHERE WidgetInstId = 847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 859;


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 = 846) END FROM WidgetInst WHERE WidgetInstId = 846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 866;


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 = 847) END FROM WidgetInst WHERE WidgetInstId = 847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 867;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 874;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 875;


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 = 910) END FROM WidgetInst WHERE WidgetInstId = 910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 914;


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 = 911) END FROM WidgetInst WHERE WidgetInstId = 911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 915;


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 = 910) END FROM WidgetInst WHERE WidgetInstId = 910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 922;


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 = 911) END FROM WidgetInst WHERE WidgetInstId = 911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 923;


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 = 910) END FROM WidgetInst WHERE WidgetInstId = 910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 930;


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 = 911) END FROM WidgetInst WHERE WidgetInstId = 911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 931;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 938;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 939;


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 = 990) END FROM WidgetInst WHERE WidgetInstId = 990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 994;


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 = 991) END FROM WidgetInst WHERE WidgetInstId = 991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 995;


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 = 990) END FROM WidgetInst WHERE WidgetInstId = 990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1002;


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 = 991) END FROM WidgetInst WHERE WidgetInstId = 991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1003;


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 = 990) END FROM WidgetInst WHERE WidgetInstId = 990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1010;


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 = 991) END FROM WidgetInst WHERE WidgetInstId = 991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1011;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1018;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 1070) END FROM WidgetInst WHERE WidgetInstId = 1070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1074;


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 = 1071) END FROM WidgetInst WHERE WidgetInstId = 1071) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 1070) END FROM WidgetInst WHERE WidgetInstId = 1070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1082;


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 = 1071) END FROM WidgetInst WHERE WidgetInstId = 1071) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1083;


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 = 1070) END FROM WidgetInst WHERE WidgetInstId = 1070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1090;


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 = 1071) END FROM WidgetInst WHERE WidgetInstId = 1071) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1091;


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 = 1094) END FROM WidgetInst WHERE WidgetInstId = 1094) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1070) END FROM WidgetInst WHERE WidgetInstId = 1070)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1098;


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 = 1095) END FROM WidgetInst WHERE WidgetInstId = 1095) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1071) END FROM WidgetInst WHERE WidgetInstId = 1071)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1099;


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 = 1094) END FROM WidgetInst WHERE WidgetInstId = 1094) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1070) END FROM WidgetInst WHERE WidgetInstId = 1070)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1106;


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 = 1095) END FROM WidgetInst WHERE WidgetInstId = 1095) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1071) END FROM WidgetInst WHERE WidgetInstId = 1071)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1107;


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 = 1094) END FROM WidgetInst WHERE WidgetInstId = 1094) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1070) END FROM WidgetInst WHERE WidgetInstId = 1070)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1114;


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 = 1095) END FROM WidgetInst WHERE WidgetInstId = 1095) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1071) END FROM WidgetInst WHERE WidgetInstId = 1071)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1115;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1122;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1123;


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 = 1130) END FROM WidgetInst WHERE WidgetInstId = 1130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1134;


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 = 1131) END FROM WidgetInst WHERE WidgetInstId = 1131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1135;


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 = 1130) END FROM WidgetInst WHERE WidgetInstId = 1130) = 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 = 'Time Series' AND WidgetInstId = 1131) END FROM WidgetInst WHERE WidgetInstId = 1131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1147;


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 = 1130) END FROM WidgetInst WHERE WidgetInstId = 1130) = 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 = 'Weir' AND WidgetInstId = 1131) END FROM WidgetInst WHERE WidgetInstId = 1131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1159;


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 = 1130) END FROM WidgetInst WHERE WidgetInstId = 1130) = 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 = 'Rating curve' AND WidgetInstId = 1131) END FROM WidgetInst WHERE WidgetInstId = 1131) = 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 = 'Link' AND WidgetInstId = 430) END FROM WidgetInst WHERE WidgetInstId = 430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1214;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1215;


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 = 1226) END FROM WidgetInst WHERE WidgetInstId = 1226) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1230;


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 = 1227) END FROM WidgetInst WHERE WidgetInstId = 1227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1231;


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 = 1226) END FROM WidgetInst WHERE WidgetInstId = 1226) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1242;


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 = 1227) END FROM WidgetInst WHERE WidgetInstId = 1227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1243;


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 = 1226) END FROM WidgetInst WHERE WidgetInstId = 1226) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1254;


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 = 1227) END FROM WidgetInst WHERE WidgetInstId = 1227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1255;


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 = 1226) END FROM WidgetInst WHERE WidgetInstId = 1226) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1298;


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 = 1227) END FROM WidgetInst WHERE WidgetInstId = 1227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1299;


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 = 1314) END FROM WidgetInst WHERE WidgetInstId = 1314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1318;


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 = 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 = 'Computed' AND WidgetInstId = 1314) END FROM WidgetInst WHERE WidgetInstId = 1314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1326;


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 = 1315) END FROM WidgetInst WHERE WidgetInstId = 1315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1327;


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 = 1314) END FROM WidgetInst WHERE WidgetInstId = 1314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1334;


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 = 1315) END FROM WidgetInst WHERE WidgetInstId = 1315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1335;


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 = 1314) END FROM WidgetInst WHERE WidgetInstId = 1314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1342;


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 = 1315) END FROM WidgetInst WHERE WidgetInstId = 1315) = 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 = 'Computed' AND WidgetInstId = 1314) END FROM WidgetInst WHERE WidgetInstId = 1314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1350;


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 = 1315) END FROM WidgetInst WHERE WidgetInstId = 1315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1351;


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 = 1314) END FROM WidgetInst WHERE WidgetInstId = 1314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1358;


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 = 1315) END FROM WidgetInst WHERE WidgetInstId = 1315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1359;


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 = 430) END FROM WidgetInst WHERE WidgetInstId = 430) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 41) END FROM WidgetInst WHERE WidgetInstId = 41)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1366;


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 = 431) END FROM WidgetInst WHERE WidgetInstId = 431) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 41) END FROM WidgetInst WHERE WidgetInstId = 41)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1367;


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 = 1374) END FROM WidgetInst WHERE WidgetInstId = 1374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1378;


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 = 1375) END FROM WidgetInst WHERE WidgetInstId = 1375) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1379;


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


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


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


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


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


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


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1389;


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 = 1391) END FROM WidgetInst WHERE WidgetInstId = 1391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1392;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1394;


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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 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 = '(none selected)' AND WidgetInstId = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1403;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1406;


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 = 1408) END FROM WidgetInst WHERE WidgetInstId = 1408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1409;


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 = 1408) END FROM WidgetInst WHERE WidgetInstId = 1408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1412;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 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 = 'Constant' AND WidgetInstId = 1417) END FROM WidgetInst WHERE WidgetInstId = 1417) = 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 = 'Time Series' AND WidgetInstId = 1417) END FROM WidgetInst WHERE WidgetInstId = 1417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1421;


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 = 1417) END FROM WidgetInst WHERE WidgetInstId = 1417) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1424;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1427;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1429) END FROM WidgetInst WHERE WidgetInstId = 1429)) = 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 = 'U.S. Customary' AND WidgetInstId = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1435;


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 = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1436;


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 = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1439;


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 = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1440;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1429) END FROM WidgetInst WHERE WidgetInstId = 1429)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1441;


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 = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1444;


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 = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1445;


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 = 1447) END FROM WidgetInst WHERE WidgetInstId = 1447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1448;


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 = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1450;


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 = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1451;


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 = 1447) END FROM WidgetInst WHERE WidgetInstId = 1447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1452;


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 = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1454;


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 = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1455;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1456;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1459;


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 = 1492) END FROM WidgetInst WHERE WidgetInstId = 1492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1493;


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 = 1492) END FROM WidgetInst WHERE WidgetInstId = 1492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1495;


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 = 1492) END FROM WidgetInst WHERE WidgetInstId = 1492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1497;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 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 = 'user' AND WidgetInstId = 1508) END FROM WidgetInst WHERE WidgetInstId = 1508) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1509;


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 = 1508) END FROM WidgetInst WHERE WidgetInstId = 1508) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1511;


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 = 1508) END FROM WidgetInst WHERE WidgetInstId = 1508) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1513;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1515;


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 = 1528) END FROM WidgetInst WHERE WidgetInstId = 1528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1529;


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 = 1528) END FROM WidgetInst WHERE WidgetInstId = 1528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1531;


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 = 1528) END FROM WidgetInst WHERE WidgetInstId = 1528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1533;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 1548) END FROM WidgetInst WHERE WidgetInstId = 1548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1549;


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 = 1548) END FROM WidgetInst WHERE WidgetInstId = 1548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1551;


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 = 1548) END FROM WidgetInst WHERE WidgetInstId = 1548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1553;


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 = 1554) END FROM WidgetInst WHERE WidgetInstId = 1554) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1548) END FROM WidgetInst WHERE WidgetInstId = 1548)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1555;


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 = 1554) END FROM WidgetInst WHERE WidgetInstId = 1554) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1548) END FROM WidgetInst WHERE WidgetInstId = 1548)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1557;


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 = 1554) END FROM WidgetInst WHERE WidgetInstId = 1554) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1548) END FROM WidgetInst WHERE WidgetInstId = 1548)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1559;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1561;


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 = 1563) END FROM WidgetInst WHERE WidgetInstId = 1563) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1564;


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 = 1563) END FROM WidgetInst WHERE WidgetInstId = 1563) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1567;


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 = 1563) END FROM WidgetInst WHERE WidgetInstId = 1563) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1570;


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 = 1563) END FROM WidgetInst WHERE WidgetInstId = 1563) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1581;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1584;


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 = 1587) END FROM WidgetInst WHERE WidgetInstId = 1587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1588;


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 = 1587) END FROM WidgetInst WHERE WidgetInstId = 1587) = 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 = 'Weir' AND WidgetInstId = 1587) END FROM WidgetInst WHERE WidgetInstId = 1587) = 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 = 1587) END FROM WidgetInst WHERE WidgetInstId = 1587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1605;


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 = 1609) END FROM WidgetInst WHERE WidgetInstId = 1609) = 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 = 'Computed' AND WidgetInstId = 1609) END FROM WidgetInst WHERE WidgetInstId = 1609) = 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 = 'Computed' AND WidgetInstId = 1609) END FROM WidgetInst WHERE WidgetInstId = 1609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1614;


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 = 1609) END FROM WidgetInst WHERE WidgetInstId = 1609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1616;


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 = 1609) END FROM WidgetInst WHERE WidgetInstId = 1609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1618;


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 = 1609) END FROM WidgetInst WHERE WidgetInstId = 1609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1620;


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 = 1388) END FROM WidgetInst WHERE WidgetInstId = 1388) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 41) END FROM WidgetInst WHERE WidgetInstId = 41)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1622;


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 = 1624) END FROM WidgetInst WHERE WidgetInstId = 1624) = 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 = 'Flow' AND WidgetInstId = 1655) END FROM WidgetInst WHERE WidgetInstId = 1655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1656;


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 = 1655) END FROM WidgetInst WHERE WidgetInstId = 1655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1658;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1664;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1672;


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 = 1668) END FROM WidgetInst WHERE WidgetInstId = 1668) = 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 = 'Parker' AND WidgetInstId = 1670) END FROM WidgetInst WHERE WidgetInstId = 1670) = 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 = 'Parker' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 = 'Parker' AND WidgetInstId = 1668) END FROM WidgetInst WHERE WidgetInstId = 1668) = 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 = 'Parker' AND WidgetInstId = 1670) END FROM WidgetInst WHERE WidgetInstId = 1670) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 1668) END FROM WidgetInst WHERE WidgetInstId = 1668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1686;


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 = 1670) END FROM WidgetInst WHERE WidgetInstId = 1670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1688;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1690;


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 = 1668) END FROM WidgetInst WHERE WidgetInstId = 1668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1692;


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 = 1670) END FROM WidgetInst WHERE WidgetInstId = 1670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1694;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1696;


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 = 1668) END FROM WidgetInst WHERE WidgetInstId = 1668) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 1670) END FROM WidgetInst WHERE WidgetInstId = 1670) = 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 = 'Wu-et-al' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 = 'Wu-et-al' AND WidgetInstId = 1668) END FROM WidgetInst WHERE WidgetInstId = 1668) = 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 = 'Wu-et-al' AND WidgetInstId = 1670) END FROM WidgetInst WHERE WidgetInstId = 1670) = 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 = 'Meyer-Peter-Muller' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1708;


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 = 1668) END FROM WidgetInst WHERE WidgetInstId = 1668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1710;


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 = 1670) END FROM WidgetInst WHERE WidgetInstId = 1670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1712;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 = 'Trinity' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1716;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1718;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1720;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1722;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1724;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1726;


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 = 'User defined' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 = 'User defined' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 = 'User defined' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 = 'Constant Length' AND WidgetInstId = 1747) END FROM WidgetInst WHERE WidgetInstId = 1747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1748;


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 = 1757) END FROM WidgetInst WHERE WidgetInstId = 1757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1758;


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 = 1760) END FROM WidgetInst WHERE WidgetInstId = 1760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1761;


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 = 1765) END FROM WidgetInst WHERE WidgetInstId = 1765) = 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 = 'Input Parameters' AND WidgetInstId = 1765) END FROM WidgetInst WHERE WidgetInstId = 1765) = 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 = 'On' AND WidgetInstId = 1757) END FROM WidgetInst WHERE WidgetInstId = 1757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1783;


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 65)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 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 = 'On' AND WidgetInstId = 1800) END FROM WidgetInst WHERE WidgetInstId = 1800) = 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 = 'Culvert HY-8' AND WidgetInstId = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 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 != '(none selected)' AND WidgetInstId = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1809;


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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1812;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1815;


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 = 1817) END FROM WidgetInst WHERE WidgetInstId = 1817) = 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 = 'Time Series' AND WidgetInstId = 1817) END FROM WidgetInst WHERE WidgetInstId = 1817) = 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1824;


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 = 1826) END FROM WidgetInst WHERE WidgetInstId = 1826) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1827;


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 = 1826) END FROM WidgetInst WHERE WidgetInstId = 1826) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1830;


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 = 1826) END FROM WidgetInst WHERE WidgetInstId = 1826) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1833;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1836;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1838) END FROM WidgetInst WHERE WidgetInstId = 1838)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1841;


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 = 1840) END FROM WidgetInst WHERE WidgetInstId = 1840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1844;


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 = 1840) END FROM WidgetInst WHERE WidgetInstId = 1840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1845;


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 = 1840) END FROM WidgetInst WHERE WidgetInstId = 1840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1848;


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 = 1840) END FROM WidgetInst WHERE WidgetInstId = 1840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1849;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1838) END FROM WidgetInst WHERE WidgetInstId = 1838)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1850;


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 = 1840) END FROM WidgetInst WHERE WidgetInstId = 1840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1853;


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 = 1840) END FROM WidgetInst WHERE WidgetInstId = 1840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1854;


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 = 1856) END FROM WidgetInst WHERE WidgetInstId = 1856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1857;


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 = 1840) END FROM WidgetInst WHERE WidgetInstId = 1840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1859;


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 = 1840) END FROM WidgetInst WHERE WidgetInstId = 1840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1860;


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 = 1856) END FROM WidgetInst WHERE WidgetInstId = 1856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1861;


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 = 1840) END FROM WidgetInst WHERE WidgetInstId = 1840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1863;


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 = 1840) END FROM WidgetInst WHERE WidgetInstId = 1840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1864;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1865;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1868;


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 = 1901) END FROM WidgetInst WHERE WidgetInstId = 1901) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1902;


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 = 1901) END FROM WidgetInst WHERE WidgetInstId = 1901) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1904;


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 = 1901) END FROM WidgetInst WHERE WidgetInstId = 1901) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1906;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1908;


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 = 1917) END FROM WidgetInst WHERE WidgetInstId = 1917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1918;


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 = 1917) END FROM WidgetInst WHERE WidgetInstId = 1917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1920;


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 = 1917) END FROM WidgetInst WHERE WidgetInstId = 1917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1922;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1924;


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 = 1937) END FROM WidgetInst WHERE WidgetInstId = 1937) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1938;


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 = 1937) END FROM WidgetInst WHERE WidgetInstId = 1937) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1940;


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 = 1937) END FROM WidgetInst WHERE WidgetInstId = 1937) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1942;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1944;


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 = 1957) END FROM WidgetInst WHERE WidgetInstId = 1957) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1958;


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 = 1957) END FROM WidgetInst WHERE WidgetInstId = 1957) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1960;


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 = 1957) END FROM WidgetInst WHERE WidgetInstId = 1957) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1962;


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 = 1963) END FROM WidgetInst WHERE WidgetInstId = 1963) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1957) END FROM WidgetInst WHERE WidgetInstId = 1957)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1964;


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 = 1963) END FROM WidgetInst WHERE WidgetInstId = 1963) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1957) END FROM WidgetInst WHERE WidgetInstId = 1957)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1966;


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 = 1963) END FROM WidgetInst WHERE WidgetInstId = 1963) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1957) END FROM WidgetInst WHERE WidgetInstId = 1957)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1968;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1970;


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 = 1972) END FROM WidgetInst WHERE WidgetInstId = 1972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1973;


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 = 1972) END FROM WidgetInst WHERE WidgetInstId = 1972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1976;


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 = 1972) END FROM WidgetInst WHERE WidgetInstId = 1972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1979;


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 = 1972) END FROM WidgetInst WHERE WidgetInstId = 1972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1990;


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 = 1797) END FROM WidgetInst WHERE WidgetInstId = 1797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1993;


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 = 1996) END FROM WidgetInst WHERE WidgetInstId = 1996) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1997;


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 = 1996) END FROM WidgetInst WHERE WidgetInstId = 1996) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2000;


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 = 1996) END FROM WidgetInst WHERE WidgetInstId = 1996) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2003;


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 = 1996) END FROM WidgetInst WHERE WidgetInstId = 1996) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2014;


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 = 2018) END FROM WidgetInst WHERE WidgetInstId = 2018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2019;


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 = 2018) END FROM WidgetInst WHERE WidgetInstId = 2018) = 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 = 'Computed' AND WidgetInstId = 2018) END FROM WidgetInst WHERE WidgetInstId = 2018) = 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 = 'Computed' AND WidgetInstId = 2018) END FROM WidgetInst WHERE WidgetInstId = 2018) = 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 = 'Computed' AND WidgetInstId = 2018) END FROM WidgetInst WHERE WidgetInstId = 2018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2027;


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 = 2018) END FROM WidgetInst WHERE WidgetInstId = 2018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2029;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 41) END FROM WidgetInst WHERE WidgetInstId = 41)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2031;


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 = 2033) END FROM WidgetInst WHERE WidgetInstId = 2033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2034;


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 65)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 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 = 'On' AND WidgetInstId = 2056) END FROM WidgetInst WHERE WidgetInstId = 2056) = 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 = 'On' AND WidgetInstId = 2057) END FROM WidgetInst WHERE WidgetInstId = 2057) = 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 = 'Culvert HY-8' AND WidgetInstId = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2068;


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 = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2069;


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 = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2092;


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 = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2093;


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 = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2104;


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 = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2105;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2116;


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 = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 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 = 'Constant' AND WidgetInstId = 2124) END FROM WidgetInst WHERE WidgetInstId = 2124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2128;


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 = 2125) END FROM WidgetInst WHERE WidgetInstId = 2125) = 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 = 'Time Series' AND WidgetInstId = 2124) END FROM WidgetInst WHERE WidgetInstId = 2124) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2140;


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 = 2125) END FROM WidgetInst WHERE WidgetInstId = 2125) = 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2152;


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 = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 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 = 'Constant' AND WidgetInstId = 2160) END FROM WidgetInst WHERE WidgetInstId = 2160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2164;


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 = 2161) END FROM WidgetInst WHERE WidgetInstId = 2161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2165;


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 = 2160) END FROM WidgetInst WHERE WidgetInstId = 2160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2176;


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 = 2161) END FROM WidgetInst WHERE WidgetInstId = 2161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2177;


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 = 2160) END FROM WidgetInst WHERE WidgetInstId = 2160) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2188;


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 = 2161) END FROM WidgetInst WHERE WidgetInstId = 2161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2189;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2200;


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 = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2201;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2208) END FROM WidgetInst WHERE WidgetInstId = 2208)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2220;


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 = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2209) END FROM WidgetInst WHERE WidgetInstId = 2209)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2221;


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 = 2216) END FROM WidgetInst WHERE WidgetInstId = 2216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2232;


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 = 2217) END FROM WidgetInst WHERE WidgetInstId = 2217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2233;


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 = 2216) END FROM WidgetInst WHERE WidgetInstId = 2216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2236;


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 = 2217) END FROM WidgetInst WHERE WidgetInstId = 2217) = 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 = 'U.S. Customary' AND WidgetInstId = 2216) END FROM WidgetInst WHERE WidgetInstId = 2216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2248;


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 = 2217) END FROM WidgetInst WHERE WidgetInstId = 2217) = 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 = 'Metric' AND WidgetInstId = 2216) END FROM WidgetInst WHERE WidgetInstId = 2216) = 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 = 'Metric' AND WidgetInstId = 2217) END FROM WidgetInst WHERE WidgetInstId = 2217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2253;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2208) END FROM WidgetInst WHERE WidgetInstId = 2208)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2256;


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 = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2209) END FROM WidgetInst WHERE WidgetInstId = 2209)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2257;


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 = 2216) END FROM WidgetInst WHERE WidgetInstId = 2216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2268;


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 = 2217) END FROM WidgetInst WHERE WidgetInstId = 2217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2269;


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 = 2216) END FROM WidgetInst WHERE WidgetInstId = 2216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2272;


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 = 2217) END FROM WidgetInst WHERE WidgetInstId = 2217) = 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 = 'Time Series' AND WidgetInstId = 2280) END FROM WidgetInst WHERE WidgetInstId = 2280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2284;


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 = 2281) END FROM WidgetInst WHERE WidgetInstId = 2281) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2285;


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 = 2216) END FROM WidgetInst WHERE WidgetInstId = 2216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2292;


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 = 2217) END FROM WidgetInst WHERE WidgetInstId = 2217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2293;


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 = 2216) END FROM WidgetInst WHERE WidgetInstId = 2216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2296;


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 = 2217) END FROM WidgetInst WHERE WidgetInstId = 2217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2297;


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 = 2280) END FROM WidgetInst WHERE WidgetInstId = 2280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2300;


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 = 2281) END FROM WidgetInst WHERE WidgetInstId = 2281) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2301;


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 = 2216) END FROM WidgetInst WHERE WidgetInstId = 2216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2308;


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 = 2217) END FROM WidgetInst WHERE WidgetInstId = 2217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2309;


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 = 2216) END FROM WidgetInst WHERE WidgetInstId = 2216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2312;


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 = 2217) END FROM WidgetInst WHERE WidgetInstId = 2217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2313;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2316;


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 = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2317;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2328;


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 = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2329;


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 = 2460) END FROM WidgetInst WHERE WidgetInstId = 2460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2464;


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 = 2461) END FROM WidgetInst WHERE WidgetInstId = 2461) = 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 = 'user' AND WidgetInstId = 2460) END FROM WidgetInst WHERE WidgetInstId = 2460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2472;


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 = 2461) END FROM WidgetInst WHERE WidgetInstId = 2461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2473;


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 = 2460) END FROM WidgetInst WHERE WidgetInstId = 2460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2480;


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 = 2461) END FROM WidgetInst WHERE WidgetInstId = 2461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2481;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 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 = 'Weir' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2489;


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 = 2524) END FROM WidgetInst WHERE WidgetInstId = 2524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2528;


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 = 2525) END FROM WidgetInst WHERE WidgetInstId = 2525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2529;


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 = 2524) END FROM WidgetInst WHERE WidgetInstId = 2524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2536;


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 = 2525) END FROM WidgetInst WHERE WidgetInstId = 2525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2537;


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 = 2524) END FROM WidgetInst WHERE WidgetInstId = 2524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2544;


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 = 2525) END FROM WidgetInst WHERE WidgetInstId = 2525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2545;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 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 = 'Gate' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 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 = 'user' AND WidgetInstId = 2604) END FROM WidgetInst WHERE WidgetInstId = 2604) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2608;


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 = 2605) END FROM WidgetInst WHERE WidgetInstId = 2605) = 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 = 'user' AND WidgetInstId = 2604) END FROM WidgetInst WHERE WidgetInstId = 2604) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2616;


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 = 2605) END FROM WidgetInst WHERE WidgetInstId = 2605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2617;


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 = 2604) END FROM WidgetInst WHERE WidgetInstId = 2604) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2624;


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 = 2605) END FROM WidgetInst WHERE WidgetInstId = 2605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2625;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 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 = 'Pressure' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2633;


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 = 2684) END FROM WidgetInst WHERE WidgetInstId = 2684) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2688;


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 = 2685) END FROM WidgetInst WHERE WidgetInstId = 2685) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2689;


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 = 2684) END FROM WidgetInst WHERE WidgetInstId = 2684) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 2685) END FROM WidgetInst WHERE WidgetInstId = 2685) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 2684) END FROM WidgetInst WHERE WidgetInstId = 2684) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2704;


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 = 2685) END FROM WidgetInst WHERE WidgetInstId = 2685) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2705;


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 = 2708) END FROM WidgetInst WHERE WidgetInstId = 2708) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2684) END FROM WidgetInst WHERE WidgetInstId = 2684)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2712;


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 = 2709) END FROM WidgetInst WHERE WidgetInstId = 2709) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2685) END FROM WidgetInst WHERE WidgetInstId = 2685)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2713;


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 = 2708) END FROM WidgetInst WHERE WidgetInstId = 2708) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2684) END FROM WidgetInst WHERE WidgetInstId = 2684)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2720;


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 = 2709) END FROM WidgetInst WHERE WidgetInstId = 2709) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2685) END FROM WidgetInst WHERE WidgetInstId = 2685)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2721;


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 = 2708) END FROM WidgetInst WHERE WidgetInstId = 2708) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2684) END FROM WidgetInst WHERE WidgetInstId = 2684)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2728;


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 = 2709) END FROM WidgetInst WHERE WidgetInstId = 2709) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2685) END FROM WidgetInst WHERE WidgetInstId = 2685)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2729;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 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 = 'Internal sink' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 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 = 'Constant' AND WidgetInstId = 2744) END FROM WidgetInst WHERE WidgetInstId = 2744) = 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 = 'Constant' AND WidgetInstId = 2745) END FROM WidgetInst WHERE WidgetInstId = 2745) = 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 = 'Time Series' AND WidgetInstId = 2744) END FROM WidgetInst WHERE WidgetInstId = 2744) = 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 = 'Time Series' AND WidgetInstId = 2745) END FROM WidgetInst WHERE WidgetInstId = 2745) = 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 = 'Weir' AND WidgetInstId = 2744) END FROM WidgetInst WHERE WidgetInstId = 2744) = 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 = 'Weir' AND WidgetInstId = 2745) END FROM WidgetInst WHERE WidgetInstId = 2745) = 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 = 'Rating curve' AND WidgetInstId = 2744) END FROM WidgetInst WHERE WidgetInstId = 2744) = 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 = 'Rating curve' AND WidgetInstId = 2745) END FROM WidgetInst WHERE WidgetInstId = 2745) = 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 = 'Link' AND WidgetInstId = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2828;


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 = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2829;


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 = 2840) END FROM WidgetInst WHERE WidgetInstId = 2840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2844;


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 = 2841) END FROM WidgetInst WHERE WidgetInstId = 2841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2845;


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 = 2840) END FROM WidgetInst WHERE WidgetInstId = 2840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2856;


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 = 2841) END FROM WidgetInst WHERE WidgetInstId = 2841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2857;


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 = 2840) END FROM WidgetInst WHERE WidgetInstId = 2840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2868;


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 = 2841) END FROM WidgetInst WHERE WidgetInstId = 2841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2869;


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 = 2840) END FROM WidgetInst WHERE WidgetInstId = 2840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2912;


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 = 2841) END FROM WidgetInst WHERE WidgetInstId = 2841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2913;


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 = 2928) END FROM WidgetInst WHERE WidgetInstId = 2928) = 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 = 'Specified' AND WidgetInstId = 2929) END FROM WidgetInst WHERE WidgetInstId = 2929) = 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 = 'Computed' AND WidgetInstId = 2928) END FROM WidgetInst WHERE WidgetInstId = 2928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2940;


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 = 2929) END FROM WidgetInst WHERE WidgetInstId = 2929) = 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 = 'Computed' AND WidgetInstId = 2928) END FROM WidgetInst WHERE WidgetInstId = 2928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2948;


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 = 2929) END FROM WidgetInst WHERE WidgetInstId = 2929) = 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 = 'Computed' AND WidgetInstId = 2928) END FROM WidgetInst WHERE WidgetInstId = 2928) = 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 = 'Computed' AND WidgetInstId = 2929) END FROM WidgetInst WHERE WidgetInstId = 2929) = 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 = 'Computed' AND WidgetInstId = 2928) END FROM WidgetInst WHERE WidgetInstId = 2928) = 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 = 'Computed' AND WidgetInstId = 2929) END FROM WidgetInst WHERE WidgetInstId = 2929) = 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 = 'Computed' AND WidgetInstId = 2928) END FROM WidgetInst WHERE WidgetInstId = 2928) = 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 = 'Computed' AND WidgetInstId = 2929) END FROM WidgetInst WHERE WidgetInstId = 2929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2973;


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 = 2044) END FROM WidgetInst WHERE WidgetInstId = 2044) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 1655) END FROM WidgetInst WHERE WidgetInstId = 1655)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2980;


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 = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 1655) END FROM WidgetInst WHERE WidgetInstId = 1655)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2981;


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 = 2988) END FROM WidgetInst WHERE WidgetInstId = 2988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2992;


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 = 2989) END FROM WidgetInst WHERE WidgetInstId = 2989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2993;


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


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


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


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


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


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


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3003;


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 = 3005) END FROM WidgetInst WHERE WidgetInstId = 3005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3006;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3008;


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 = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3014;


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 = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3017;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3020;


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 = 3022) END FROM WidgetInst WHERE WidgetInstId = 3022) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3023;


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 = 3022) END FROM WidgetInst WHERE WidgetInstId = 3022) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3026;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3029;


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 = 3031) END FROM WidgetInst WHERE WidgetInstId = 3031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3032;


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 = 3031) END FROM WidgetInst WHERE WidgetInstId = 3031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3035;


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 = 3031) END FROM WidgetInst WHERE WidgetInstId = 3031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3038;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3041;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3043) END FROM WidgetInst WHERE WidgetInstId = 3043)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3046;


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 = 3045) END FROM WidgetInst WHERE WidgetInstId = 3045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3049;


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 = 3045) END FROM WidgetInst WHERE WidgetInstId = 3045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3050;


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 = 3045) END FROM WidgetInst WHERE WidgetInstId = 3045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3053;


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 = 3045) END FROM WidgetInst WHERE WidgetInstId = 3045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3054;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3043) END FROM WidgetInst WHERE WidgetInstId = 3043)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3055;


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 = 3045) END FROM WidgetInst WHERE WidgetInstId = 3045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3058;


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 = 3045) END FROM WidgetInst WHERE WidgetInstId = 3045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3059;


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 = 3061) END FROM WidgetInst WHERE WidgetInstId = 3061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3062;


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 = 3045) END FROM WidgetInst WHERE WidgetInstId = 3045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3064;


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 = 3045) END FROM WidgetInst WHERE WidgetInstId = 3045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3065;


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 = 3061) END FROM WidgetInst WHERE WidgetInstId = 3061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3066;


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 = 3045) END FROM WidgetInst WHERE WidgetInstId = 3045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3068;


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 = 3045) END FROM WidgetInst WHERE WidgetInstId = 3045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3069;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3070;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3073;


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 = 3106) END FROM WidgetInst WHERE WidgetInstId = 3106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3107;


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 = 3106) END FROM WidgetInst WHERE WidgetInstId = 3106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3109;


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 = 3106) END FROM WidgetInst WHERE WidgetInstId = 3106) = 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 = 'Weir' AND WidgetInstId = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3113;


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 = 3122) END FROM WidgetInst WHERE WidgetInstId = 3122) = 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 = 'user' AND WidgetInstId = 3122) END FROM WidgetInst WHERE WidgetInstId = 3122) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3125;


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 = 3122) END FROM WidgetInst WHERE WidgetInstId = 3122) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3127;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3129;


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 = 3142) END FROM WidgetInst WHERE WidgetInstId = 3142) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3143;


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 = 3142) END FROM WidgetInst WHERE WidgetInstId = 3142) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3145;


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 = 3142) END FROM WidgetInst WHERE WidgetInstId = 3142) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3147;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3149;


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 = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3163;


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 = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3165;


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 = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162) = 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 = 3168) END FROM WidgetInst WHERE WidgetInstId = 3168) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3169;


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 = 3168) END FROM WidgetInst WHERE WidgetInstId = 3168) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162)) = 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 = 3168) END FROM WidgetInst WHERE WidgetInstId = 3168) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3173;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 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 = 'Constant' AND WidgetInstId = 3177) END FROM WidgetInst WHERE WidgetInstId = 3177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3178;


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 = 3177) END FROM WidgetInst WHERE WidgetInstId = 3177) = 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 = 'Weir' AND WidgetInstId = 3177) END FROM WidgetInst WHERE WidgetInstId = 3177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3184;


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 = 3177) END FROM WidgetInst WHERE WidgetInstId = 3177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3195;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3198;


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 = 3201) END FROM WidgetInst WHERE WidgetInstId = 3201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3202;


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 = 3201) END FROM WidgetInst WHERE WidgetInstId = 3201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3205;


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 = 3201) END FROM WidgetInst WHERE WidgetInstId = 3201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3208;


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 = 3201) END FROM WidgetInst WHERE WidgetInstId = 3201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3219;


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 = 3223) END FROM WidgetInst WHERE WidgetInstId = 3223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3224;


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 = 3223) END FROM WidgetInst WHERE WidgetInstId = 3223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3226;


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 = 3223) END FROM WidgetInst WHERE WidgetInstId = 3223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3228;


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 = 3223) END FROM WidgetInst WHERE WidgetInstId = 3223) = 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 = 'Computed' AND WidgetInstId = 3223) END FROM WidgetInst WHERE WidgetInstId = 3223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3232;


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 = 3223) END FROM WidgetInst WHERE WidgetInstId = 3223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3234;


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 = 3002) END FROM WidgetInst WHERE WidgetInstId = 3002) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 1655) END FROM WidgetInst WHERE WidgetInstId = 1655)) = 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 = 'File' AND WidgetInstId = 3238) END FROM WidgetInst WHERE WidgetInstId = 3238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3239;


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 = 3266) END FROM WidgetInst WHERE WidgetInstId = 3266) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3267;


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 = 3266) END FROM WidgetInst WHERE WidgetInstId = 3266) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3269;


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 = 3276) END FROM WidgetInst WHERE WidgetInstId = 3276) = 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 = 'Constant' AND WidgetInstId = 3277) END FROM WidgetInst WHERE WidgetInstId = 3277) = 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 = 'Constant' AND WidgetInstId = 3278) END FROM WidgetInst WHERE WidgetInstId = 3278) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3283;


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 = 3279) END FROM WidgetInst WHERE WidgetInstId = 3279) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3284;


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 = 3280) END FROM WidgetInst WHERE WidgetInstId = 3280) = 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 = 'Depth Varied' AND WidgetInstId = 3276) END FROM WidgetInst WHERE WidgetInstId = 3276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3291;


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 = 3277) END FROM WidgetInst WHERE WidgetInstId = 3277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3292;


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 = 3278) END FROM WidgetInst WHERE WidgetInstId = 3278) = 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 = 'Depth Varied' AND WidgetInstId = 3279) END FROM WidgetInst WHERE WidgetInstId = 3279) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3294;


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 = 3280) END FROM WidgetInst WHERE WidgetInstId = 3280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3295;


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 = 3305) END FROM WidgetInst WHERE WidgetInstId = 3305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3306;


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 = 3305) END FROM WidgetInst WHERE WidgetInstId = 3305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3308;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3314;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3322;


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 = 3318) END FROM WidgetInst WHERE WidgetInstId = 3318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3324;


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 = 3320) END FROM WidgetInst WHERE WidgetInstId = 3320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3326;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3328;


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 = 3318) END FROM WidgetInst WHERE WidgetInstId = 3318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3330;


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 = 3320) END FROM WidgetInst WHERE WidgetInstId = 3320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3332;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3334;


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 = 3318) END FROM WidgetInst WHERE WidgetInstId = 3318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3336;


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 = 3320) END FROM WidgetInst WHERE WidgetInstId = 3320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3338;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3340;


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 = 3318) END FROM WidgetInst WHERE WidgetInstId = 3318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3342;


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 = 3320) END FROM WidgetInst WHERE WidgetInstId = 3320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3344;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3346;


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 = 3318) END FROM WidgetInst WHERE WidgetInstId = 3318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3348;


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 = 3320) END FROM WidgetInst WHERE WidgetInstId = 3320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3350;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3352;


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 = 3318) END FROM WidgetInst WHERE WidgetInstId = 3318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3354;


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 = 3320) END FROM WidgetInst WHERE WidgetInstId = 3320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3356;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3358;


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 = 3318) END FROM WidgetInst WHERE WidgetInstId = 3318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3360;


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 = 3320) END FROM WidgetInst WHERE WidgetInstId = 3320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3362;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3364;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3366;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3368;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3370;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 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 = 'Seminara' AND WidgetInstId = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 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 = 'Seminara' AND WidgetInstId = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3376;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3378;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3380;


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 = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 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 = 'User defined' AND WidgetInstId = 3313) END FROM WidgetInst WHERE WidgetInstId = 3313) = 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 = 'Constant Length' AND WidgetInstId = 3397) END FROM WidgetInst WHERE WidgetInstId = 3397) = 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 = 'On' AND WidgetInstId = 3407) END FROM WidgetInst WHERE WidgetInstId = 3407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3408;


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 = 3410) END FROM WidgetInst WHERE WidgetInstId = 3410) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3411;


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 = 3415) END FROM WidgetInst WHERE WidgetInstId = 3415) = 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 = 'Input Parameters' AND WidgetInstId = 3415) END FROM WidgetInst WHERE WidgetInstId = 3415) = 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 = 'On' AND WidgetInstId = 3407) END FROM WidgetInst WHERE WidgetInstId = 3407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3433;


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


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


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


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


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


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


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 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 = 'On' AND WidgetInstId = 3450) END FROM WidgetInst WHERE WidgetInstId = 3450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3451;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3453;


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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3459;


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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3465;


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 = 3467) END FROM WidgetInst WHERE WidgetInstId = 3467) = 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 = 'Time Series' AND WidgetInstId = 3467) END FROM WidgetInst WHERE WidgetInstId = 3467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3471;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 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' AND WidgetInstId = 3476) END FROM WidgetInst WHERE WidgetInstId = 3476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3477;


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 = 3476) END FROM WidgetInst WHERE WidgetInstId = 3476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3480;


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 = 3476) END FROM WidgetInst WHERE WidgetInstId = 3476) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3483;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3486;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3488) END FROM WidgetInst WHERE WidgetInstId = 3488)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3491;


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 = 3490) END FROM WidgetInst WHERE WidgetInstId = 3490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3494;


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 = 3490) END FROM WidgetInst WHERE WidgetInstId = 3490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3495;


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 = 3490) END FROM WidgetInst WHERE WidgetInstId = 3490) = 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 = 'Metric' AND WidgetInstId = 3490) END FROM WidgetInst WHERE WidgetInstId = 3490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3499;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3488) END FROM WidgetInst WHERE WidgetInstId = 3488)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3500;


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 = 3490) END FROM WidgetInst WHERE WidgetInstId = 3490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3503;


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 = 3490) END FROM WidgetInst WHERE WidgetInstId = 3490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3504;


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 = 3506) END FROM WidgetInst WHERE WidgetInstId = 3506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3507;


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 = 3490) END FROM WidgetInst WHERE WidgetInstId = 3490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3509;


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 = 3490) END FROM WidgetInst WHERE WidgetInstId = 3490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3510;


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 = 3506) END FROM WidgetInst WHERE WidgetInstId = 3506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3511;


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 = 3490) END FROM WidgetInst WHERE WidgetInstId = 3490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3513;


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 = 3490) END FROM WidgetInst WHERE WidgetInstId = 3490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3514;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3515;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3518;


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 = 3551) END FROM WidgetInst WHERE WidgetInstId = 3551) = 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 = 'user' AND WidgetInstId = 3551) END FROM WidgetInst WHERE WidgetInstId = 3551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3554;


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 = 3551) END FROM WidgetInst WHERE WidgetInstId = 3551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3556;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 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 = 'user' AND WidgetInstId = 3567) END FROM WidgetInst WHERE WidgetInstId = 3567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3568;


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 = 3567) END FROM WidgetInst WHERE WidgetInstId = 3567) = 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 = 'user' AND WidgetInstId = 3567) END FROM WidgetInst WHERE WidgetInstId = 3567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3572;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3574;


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 = 3587) END FROM WidgetInst WHERE WidgetInstId = 3587) = 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 = 'user' AND WidgetInstId = 3587) END FROM WidgetInst WHERE WidgetInstId = 3587) = 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 = 'user' AND WidgetInstId = 3587) END FROM WidgetInst WHERE WidgetInstId = 3587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3592;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 3607) END FROM WidgetInst WHERE WidgetInstId = 3607) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 3607) END FROM WidgetInst WHERE WidgetInstId = 3607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3610;


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 = 3607) END FROM WidgetInst WHERE WidgetInstId = 3607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3612;


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 = 3613) END FROM WidgetInst WHERE WidgetInstId = 3613) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3607) END FROM WidgetInst WHERE WidgetInstId = 3607)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3614;


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 = 3613) END FROM WidgetInst WHERE WidgetInstId = 3613) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3607) END FROM WidgetInst WHERE WidgetInstId = 3607)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3616;


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 = 3613) END FROM WidgetInst WHERE WidgetInstId = 3613) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3607) END FROM WidgetInst WHERE WidgetInstId = 3607)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3618;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3620;


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 = 3622) END FROM WidgetInst WHERE WidgetInstId = 3622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3623;


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 = 3622) END FROM WidgetInst WHERE WidgetInstId = 3622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3626;


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 = 3622) END FROM WidgetInst WHERE WidgetInstId = 3622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3629;


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 = 3622) END FROM WidgetInst WHERE WidgetInstId = 3622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3640;


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 = 3447) END FROM WidgetInst WHERE WidgetInstId = 3447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3643;


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 = 3646) END FROM WidgetInst WHERE WidgetInstId = 3646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3647;


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 = 3646) END FROM WidgetInst WHERE WidgetInstId = 3646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3650;


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 = 3646) END FROM WidgetInst WHERE WidgetInstId = 3646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3653;


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 = 3646) END FROM WidgetInst WHERE WidgetInstId = 3646) = 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 = 'Specified' AND WidgetInstId = 3668) END FROM WidgetInst WHERE WidgetInstId = 3668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3669;


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 = 3668) END FROM WidgetInst WHERE WidgetInstId = 3668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3671;


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 = 3668) END FROM WidgetInst WHERE WidgetInstId = 3668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3673;


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 = 3668) END FROM WidgetInst WHERE WidgetInstId = 3668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3675;


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 = 3668) END FROM WidgetInst WHERE WidgetInstId = 3668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3677;


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 = 3668) END FROM WidgetInst WHERE WidgetInstId = 3668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3679;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 41) END FROM WidgetInst WHERE WidgetInstId = 41)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3681;


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 = 3683) END FROM WidgetInst WHERE WidgetInstId = 3683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3684;


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


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


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


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


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


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


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


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


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


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


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


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


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 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 TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3699;


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 = 3706) END FROM WidgetInst WHERE WidgetInstId = 3706) = 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 = 'On' AND WidgetInstId = 3707) END FROM WidgetInst WHERE WidgetInstId = 3707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3711;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3718;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 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 != '(none selected)' AND WidgetInstId = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3742;


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 = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 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 = '(none selected)' AND WidgetInstId = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 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 = '(none selected)' AND WidgetInstId = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3755;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3766;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 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 = 'Constant' AND WidgetInstId = 3774) END FROM WidgetInst WHERE WidgetInstId = 3774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3778;


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 = 3775) END FROM WidgetInst WHERE WidgetInstId = 3775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3779;


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 = 3774) END FROM WidgetInst WHERE WidgetInstId = 3774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3790;


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 = 3775) END FROM WidgetInst WHERE WidgetInstId = 3775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3791;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3802;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3803;


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 = 3810) END FROM WidgetInst WHERE WidgetInstId = 3810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3814;


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 = 3811) END FROM WidgetInst WHERE WidgetInstId = 3811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3815;


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 = 3810) END FROM WidgetInst WHERE WidgetInstId = 3810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3826;


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 = 3811) END FROM WidgetInst WHERE WidgetInstId = 3811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3827;


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 = 3810) END FROM WidgetInst WHERE WidgetInstId = 3810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3838;


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 = 3811) END FROM WidgetInst WHERE WidgetInstId = 3811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3839;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3850;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3851;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3870;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3871;


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 = 3886;


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 = 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 = 3898;


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 = 3899;


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 = 3902;


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 = 3903;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3906;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859)) = 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 = 'U.S. Customary' AND WidgetInstId = 3866) END FROM WidgetInst WHERE WidgetInstId = 3866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3918;


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 = 3919;


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 = 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 = 'Metric' AND WidgetInstId = 3867) END FROM WidgetInst WHERE WidgetInstId = 3867) = 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 = 'Time Series' AND WidgetInstId = 3930) END FROM WidgetInst WHERE WidgetInstId = 3930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3934;


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 = 3931) END FROM WidgetInst WHERE WidgetInstId = 3931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3935;


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 = 3942;


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 = 3943;


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 = 3946;


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 = 3947;


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 = 3930) END FROM WidgetInst WHERE WidgetInstId = 3930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3950;


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 = 3931) END FROM WidgetInst WHERE WidgetInstId = 3931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3951;


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 = 3958;


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 = 3959;


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 = 3962;


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 = 3963;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3966;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3967;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3978;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3979;


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 = 4110) END FROM WidgetInst WHERE WidgetInstId = 4110) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4114;


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 = 4111) END FROM WidgetInst WHERE WidgetInstId = 4111) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4115;


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 = 4110) END FROM WidgetInst WHERE WidgetInstId = 4110) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4122;


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 = 4111) END FROM WidgetInst WHERE WidgetInstId = 4111) = 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 = 'user' AND WidgetInstId = 4110) END FROM WidgetInst WHERE WidgetInstId = 4110) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4130;


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 = 4111) END FROM WidgetInst WHERE WidgetInstId = 4111) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4131;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 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 = 'Weir' AND WidgetInstId = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 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 = 'user' AND WidgetInstId = 4174) END FROM WidgetInst WHERE WidgetInstId = 4174) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4178;


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 = 4175) END FROM WidgetInst WHERE WidgetInstId = 4175) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4179;


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 = 4174) END FROM WidgetInst WHERE WidgetInstId = 4174) = 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 = 'user' AND WidgetInstId = 4175) END FROM WidgetInst WHERE WidgetInstId = 4175) = 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 = 'user' AND WidgetInstId = 4174) END FROM WidgetInst WHERE WidgetInstId = 4174) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4194;


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 = 4175) END FROM WidgetInst WHERE WidgetInstId = 4175) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4195;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4202;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4203;


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 = 4254) END FROM WidgetInst WHERE WidgetInstId = 4254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4258;


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 = 4255) END FROM WidgetInst WHERE WidgetInstId = 4255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4259;


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 = 4254) END FROM WidgetInst WHERE WidgetInstId = 4254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4266;


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 = 4255) END FROM WidgetInst WHERE WidgetInstId = 4255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4267;


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 = 4254) END FROM WidgetInst WHERE WidgetInstId = 4254) = 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 = 'user' AND WidgetInstId = 4255) END FROM WidgetInst WHERE WidgetInstId = 4255) = 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 = 'Pressure' AND WidgetInstId = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 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 = 'Pressure' AND WidgetInstId = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 4334) END FROM WidgetInst WHERE WidgetInstId = 4334) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4338;


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 = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 4334) END FROM WidgetInst WHERE WidgetInstId = 4334) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4346;


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 = 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 IntValues WHERE Value = 1 AND WidgetInstId = 4334) END FROM WidgetInst WHERE WidgetInstId = 4334) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4354;


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 = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4355;


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 = 4358) END FROM WidgetInst WHERE WidgetInstId = 4358) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4334) END FROM WidgetInst WHERE WidgetInstId = 4334)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4362;


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 = 4359) END FROM WidgetInst WHERE WidgetInstId = 4359) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4363;


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 = 4358) END FROM WidgetInst WHERE WidgetInstId = 4358) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4334) END FROM WidgetInst WHERE WidgetInstId = 4334)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4370;


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 = 4359) END FROM WidgetInst WHERE WidgetInstId = 4359) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 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 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 = 4358) END FROM WidgetInst WHERE WidgetInstId = 4358) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4334) END FROM WidgetInst WHERE WidgetInstId = 4334)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4378;


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 = 4359) END FROM WidgetInst WHERE WidgetInstId = 4359) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4335) END FROM WidgetInst WHERE WidgetInstId = 4335)) = 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 = 'Internal sink' AND WidgetInstId = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4386;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 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 = 'Constant' AND WidgetInstId = 4394) END FROM WidgetInst WHERE WidgetInstId = 4394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4398;


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 = 4395) END FROM WidgetInst WHERE WidgetInstId = 4395) = 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 = 'Time Series' AND WidgetInstId = 4394) END FROM WidgetInst WHERE WidgetInstId = 4394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4410;


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 = 4395) END FROM WidgetInst WHERE WidgetInstId = 4395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4411;


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 = 4394) END FROM WidgetInst WHERE WidgetInstId = 4394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4422;


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 = 4395) END FROM WidgetInst WHERE WidgetInstId = 4395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4423;


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 = 4394) END FROM WidgetInst WHERE WidgetInstId = 4394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4466;


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 = 4395) END FROM WidgetInst WHERE WidgetInstId = 4395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4467;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4478;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 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 = 'Constant' AND WidgetInstId = 4490) END FROM WidgetInst WHERE WidgetInstId = 4490) = 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 = 'Constant' AND WidgetInstId = 4491) END FROM WidgetInst WHERE WidgetInstId = 4491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4495;


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 = 4490) END FROM WidgetInst WHERE WidgetInstId = 4490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4506;


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 = 4491) END FROM WidgetInst WHERE WidgetInstId = 4491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4507;


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 = 4490) END FROM WidgetInst WHERE WidgetInstId = 4490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4518;


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 = 4491) END FROM WidgetInst WHERE WidgetInstId = 4491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4519;


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 = 4490) END FROM WidgetInst WHERE WidgetInstId = 4490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4562;


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 = 4491) END FROM WidgetInst WHERE WidgetInstId = 4491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4563;


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 = 4578) END FROM WidgetInst WHERE WidgetInstId = 4578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4582;


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 = 4579) END FROM WidgetInst WHERE WidgetInstId = 4579) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4583;


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 = 4578) END FROM WidgetInst WHERE WidgetInstId = 4578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4590;


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 = 4579) END FROM WidgetInst WHERE WidgetInstId = 4579) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4591;


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 = 4578) END FROM WidgetInst WHERE WidgetInstId = 4578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4598;


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 = 4579) END FROM WidgetInst WHERE WidgetInstId = 4579) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4599;


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 = 4578) END FROM WidgetInst WHERE WidgetInstId = 4578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4606;


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 = 4579) END FROM WidgetInst WHERE WidgetInstId = 4579) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4607;


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 = 4578) END FROM WidgetInst WHERE WidgetInstId = 4578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4614;


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 = 4579) END FROM WidgetInst WHERE WidgetInstId = 4579) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4615;


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 = 4578) END FROM WidgetInst WHERE WidgetInstId = 4578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4622;


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 = 4579) END FROM WidgetInst WHERE WidgetInstId = 4579) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4623;


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 = 3694) END FROM WidgetInst WHERE WidgetInstId = 3694) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 3305) END FROM WidgetInst WHERE WidgetInstId = 3305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4630;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 3305) END FROM WidgetInst WHERE WidgetInstId = 3305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4631;


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 = 4638) END FROM WidgetInst WHERE WidgetInstId = 4638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4642;


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 = 4639) END FROM WidgetInst WHERE WidgetInstId = 4639) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4643;


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


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


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


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


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


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


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4653;


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 = 4655) END FROM WidgetInst WHERE WidgetInstId = 4655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4656;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4658;


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 = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4664;


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 = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4667;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4670;


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 = 4672) END FROM WidgetInst WHERE WidgetInstId = 4672) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4673;


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 = 4672) END FROM WidgetInst WHERE WidgetInstId = 4672) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4676;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4679;


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 = 4681) END FROM WidgetInst WHERE WidgetInstId = 4681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4682;


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 = 4681) END FROM WidgetInst WHERE WidgetInstId = 4681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4685;


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 = 4681) END FROM WidgetInst WHERE WidgetInstId = 4681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4688;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4691;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4696;


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 = 4695) END FROM WidgetInst WHERE WidgetInstId = 4695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4699;


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 = 4695) END FROM WidgetInst WHERE WidgetInstId = 4695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4700;


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 = 4695) END FROM WidgetInst WHERE WidgetInstId = 4695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4703;


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 = 4695) END FROM WidgetInst WHERE WidgetInstId = 4695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4704;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4693) END FROM WidgetInst WHERE WidgetInstId = 4693)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4705;


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 = 4695) END FROM WidgetInst WHERE WidgetInstId = 4695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4708;


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 = 4695) END FROM WidgetInst WHERE WidgetInstId = 4695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4709;


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 = 4711) END FROM WidgetInst WHERE WidgetInstId = 4711) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4712;


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 = 4695) END FROM WidgetInst WHERE WidgetInstId = 4695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4714;


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 = 4695) END FROM WidgetInst WHERE WidgetInstId = 4695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4715;


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 = 4711) END FROM WidgetInst WHERE WidgetInstId = 4711) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4716;


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 = 4695) END FROM WidgetInst WHERE WidgetInstId = 4695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4718;


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 = 4695) END FROM WidgetInst WHERE WidgetInstId = 4695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4719;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4720;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4723;


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 = 4756) END FROM WidgetInst WHERE WidgetInstId = 4756) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4757;


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 = 4756) END FROM WidgetInst WHERE WidgetInstId = 4756) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4759;


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 = 4756) END FROM WidgetInst WHERE WidgetInstId = 4756) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4761;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4763;


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 = 4772) END FROM WidgetInst WHERE WidgetInstId = 4772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4773;


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 = 4772) END FROM WidgetInst WHERE WidgetInstId = 4772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4775;


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 = 4772) END FROM WidgetInst WHERE WidgetInstId = 4772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4777;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4779;


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 = 4792) END FROM WidgetInst WHERE WidgetInstId = 4792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4793;


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 = 4792) END FROM WidgetInst WHERE WidgetInstId = 4792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4795;


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 = 4792) END FROM WidgetInst WHERE WidgetInstId = 4792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4797;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4799;


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 = 4812) END FROM WidgetInst WHERE WidgetInstId = 4812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4813;


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 = 4812) END FROM WidgetInst WHERE WidgetInstId = 4812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4815;


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 = 4812) END FROM WidgetInst WHERE WidgetInstId = 4812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4817;


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 = 4818) END FROM WidgetInst WHERE WidgetInstId = 4818) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4812) END FROM WidgetInst WHERE WidgetInstId = 4812)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4819;


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 = 4818) END FROM WidgetInst WHERE WidgetInstId = 4818) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4812) END FROM WidgetInst WHERE WidgetInstId = 4812)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4821;


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 = 4818) END FROM WidgetInst WHERE WidgetInstId = 4818) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4812) END FROM WidgetInst WHERE WidgetInstId = 4812)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4823;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4825;


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 = 4827) END FROM WidgetInst WHERE WidgetInstId = 4827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4828;


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 = 4827) END FROM WidgetInst WHERE WidgetInstId = 4827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4831;


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 = 4827) END FROM WidgetInst WHERE WidgetInstId = 4827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4834;


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 = 4827) END FROM WidgetInst WHERE WidgetInstId = 4827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4845;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4848;


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 = 4851) END FROM WidgetInst WHERE WidgetInstId = 4851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4852;


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 = 4851) END FROM WidgetInst WHERE WidgetInstId = 4851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4855;


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 = 4851) END FROM WidgetInst WHERE WidgetInstId = 4851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4858;


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 = 4851) END FROM WidgetInst WHERE WidgetInstId = 4851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4869;


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 = 4873) END FROM WidgetInst WHERE WidgetInstId = 4873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4874;


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 = 4873) END FROM WidgetInst WHERE WidgetInstId = 4873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4876;


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 = 4873) END FROM WidgetInst WHERE WidgetInstId = 4873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4878;


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 = 4873) END FROM WidgetInst WHERE WidgetInstId = 4873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4880;


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 = 4873) END FROM WidgetInst WHERE WidgetInstId = 4873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4882;


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 = 4873) END FROM WidgetInst WHERE WidgetInstId = 4873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4884;


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 = 4652) END FROM WidgetInst WHERE WidgetInstId = 4652) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 3305) END FROM WidgetInst WHERE WidgetInstId = 3305)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4886;


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 = 4888) END FROM WidgetInst WHERE WidgetInstId = 4888) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4889;


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 = 4916) END FROM WidgetInst WHERE WidgetInstId = 4916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4917;


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 = 4916) END FROM WidgetInst WHERE WidgetInstId = 4916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4919;


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 = 4926) END FROM WidgetInst WHERE WidgetInstId = 4926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4931;


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 = 4927) END FROM WidgetInst WHERE WidgetInstId = 4927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4932;


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 = 4928) END FROM WidgetInst WHERE WidgetInstId = 4928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4933;


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 = 4929) END FROM WidgetInst WHERE WidgetInstId = 4929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4934;


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 = 4930) END FROM WidgetInst WHERE WidgetInstId = 4930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4935;


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 = 4926) END FROM WidgetInst WHERE WidgetInstId = 4926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4941;


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 = 4927) END FROM WidgetInst WHERE WidgetInstId = 4927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4942;


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 = 4928) END FROM WidgetInst WHERE WidgetInstId = 4928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4943;


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 = 4929) END FROM WidgetInst WHERE WidgetInstId = 4929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4944;


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 = 4930) END FROM WidgetInst WHERE WidgetInstId = 4930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4945;


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 = 4955) END FROM WidgetInst WHERE WidgetInstId = 4955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4956;


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 = 4955) END FROM WidgetInst WHERE WidgetInstId = 4955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4958;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4964;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4972;


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 = 4968) END FROM WidgetInst WHERE WidgetInstId = 4968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4974;


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 = 4970) END FROM WidgetInst WHERE WidgetInstId = 4970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4976;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4978;


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 = 4968) END FROM WidgetInst WHERE WidgetInstId = 4968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4980;


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 = 4970) END FROM WidgetInst WHERE WidgetInstId = 4970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4982;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4984;


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 = 4968) END FROM WidgetInst WHERE WidgetInstId = 4968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4986;


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 = 4970) END FROM WidgetInst WHERE WidgetInstId = 4970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4988;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4990;


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 = 4968) END FROM WidgetInst WHERE WidgetInstId = 4968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4992;


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 = 4970) END FROM WidgetInst WHERE WidgetInstId = 4970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4994;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4996;


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 = 4968) END FROM WidgetInst WHERE WidgetInstId = 4968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4998;


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 = 4970) END FROM WidgetInst WHERE WidgetInstId = 4970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5000;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5002;


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 = 4968) END FROM WidgetInst WHERE WidgetInstId = 4968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5004;


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 = 4970) END FROM WidgetInst WHERE WidgetInstId = 4970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5006;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5008;


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 = 4968) END FROM WidgetInst WHERE WidgetInstId = 4968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5010;


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 = 4970) END FROM WidgetInst WHERE WidgetInstId = 4970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5012;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5014;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5016;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5018;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5020;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5022;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5024;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5026;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5028;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5030;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5032;


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 = 4963) END FROM WidgetInst WHERE WidgetInstId = 4963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5034;


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 = 5047) END FROM WidgetInst WHERE WidgetInstId = 5047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5048;


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 = 5057) END FROM WidgetInst WHERE WidgetInstId = 5057) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5058;


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 = 5060) END FROM WidgetInst WHERE WidgetInstId = 5060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5061;


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 = 5065) END FROM WidgetInst WHERE WidgetInstId = 5065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5066;


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 = 5065) END FROM WidgetInst WHERE WidgetInstId = 5065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5068;


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 = 5057) END FROM WidgetInst WHERE WidgetInstId = 5057) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5083;


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 = 5097;


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 = 5097;


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 = 5097;


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 = 5097;


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 = 5097;


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 = 5097;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5098;


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 = 5100) END FROM WidgetInst WHERE WidgetInstId = 5100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5101;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5103;


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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5109;


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 = 38) END FROM WidgetInst WHERE WidgetInstId = 38) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5112;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5115;


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 = 5117) END FROM WidgetInst WHERE WidgetInstId = 5117) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5118;


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 = 5117) END FROM WidgetInst WHERE WidgetInstId = 5117) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5121;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5124;


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 = 5126) END FROM WidgetInst WHERE WidgetInstId = 5126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5127;


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 = 5126) END FROM WidgetInst WHERE WidgetInstId = 5126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5130;


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 = 5126) END FROM WidgetInst WHERE WidgetInstId = 5126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5133;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5136;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5138) END FROM WidgetInst WHERE WidgetInstId = 5138)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5141;


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 = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5144;


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 = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5145;


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 = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5148;


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 = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5149;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5138) END FROM WidgetInst WHERE WidgetInstId = 5138)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5150;


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 = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5153;


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 = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5154;


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 = 5156) END FROM WidgetInst WHERE WidgetInstId = 5156) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5157;


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 = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5159;


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 = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5160;


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 = 5156) END FROM WidgetInst WHERE WidgetInstId = 5156) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5161;


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 = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5163;


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 = 5140) END FROM WidgetInst WHERE WidgetInstId = 5140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5164;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5165;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5168;


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 = 5201) END FROM WidgetInst WHERE WidgetInstId = 5201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5202;


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 = 5201) END FROM WidgetInst WHERE WidgetInstId = 5201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5204;


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 = 5201) END FROM WidgetInst WHERE WidgetInstId = 5201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5206;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5208;


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 = 5217) END FROM WidgetInst WHERE WidgetInstId = 5217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5218;


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 = 5217) END FROM WidgetInst WHERE WidgetInstId = 5217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5220;


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 = 5217) END FROM WidgetInst WHERE WidgetInstId = 5217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5222;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5224;


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 = 5237) END FROM WidgetInst WHERE WidgetInstId = 5237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5238;


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 = 5237) END FROM WidgetInst WHERE WidgetInstId = 5237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5240;


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 = 5237) END FROM WidgetInst WHERE WidgetInstId = 5237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5242;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5244;


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 = 5257) END FROM WidgetInst WHERE WidgetInstId = 5257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5258;


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 = 5257) END FROM WidgetInst WHERE WidgetInstId = 5257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5260;


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 = 5257) END FROM WidgetInst WHERE WidgetInstId = 5257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5262;


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 = 5263) END FROM WidgetInst WHERE WidgetInstId = 5263) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5257) END FROM WidgetInst WHERE WidgetInstId = 5257)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5264;


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 = 5263) END FROM WidgetInst WHERE WidgetInstId = 5263) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5257) END FROM WidgetInst WHERE WidgetInstId = 5257)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5266;


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 = 5263) END FROM WidgetInst WHERE WidgetInstId = 5263) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5257) END FROM WidgetInst WHERE WidgetInstId = 5257)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5268;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5270;


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 = 5272) END FROM WidgetInst WHERE WidgetInstId = 5272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5273;


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 = 5272) END FROM WidgetInst WHERE WidgetInstId = 5272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5276;


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 = 5272) END FROM WidgetInst WHERE WidgetInstId = 5272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5279;


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 = 5272) END FROM WidgetInst WHERE WidgetInstId = 5272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5290;


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 = 5097) END FROM WidgetInst WHERE WidgetInstId = 5097) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5293;


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 = 5296) END FROM WidgetInst WHERE WidgetInstId = 5296) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5297;


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 = 5296) END FROM WidgetInst WHERE WidgetInstId = 5296) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5300;


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 = 5296) END FROM WidgetInst WHERE WidgetInstId = 5296) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5303;


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 = 5296) END FROM WidgetInst WHERE WidgetInstId = 5296) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5314;


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 = 5318) END FROM WidgetInst WHERE WidgetInstId = 5318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5319;


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 = 5318) END FROM WidgetInst WHERE WidgetInstId = 5318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5321;


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 = 5318) END FROM WidgetInst WHERE WidgetInstId = 5318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5323;


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 = 5318) END FROM WidgetInst WHERE WidgetInstId = 5318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5325;


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 = 5318) END FROM WidgetInst WHERE WidgetInstId = 5318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5327;


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 = 5318) END FROM WidgetInst WHERE WidgetInstId = 5318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5329;


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 = 183) END FROM WidgetInst WHERE WidgetInstId = 183) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 41) END FROM WidgetInst WHERE WidgetInstId = 41)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5331;


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 = 5333) END FROM WidgetInst WHERE WidgetInstId = 5333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5334;


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 = 5344;


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 = 5344;


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 = 5344;


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 = 5344;


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 = 5344;


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 = 5344;


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 = 5345;


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 = 5345;


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 = 5345;


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 = 5345;


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 = 5345;


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 = 5345;


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 = 5346;


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 = 5346;


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 = 5346;


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 = 5346;


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 = 5346;


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 = 5346;


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 = 5347;


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 = 5347;


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 = 5347;


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 = 5347;


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 = 5347;


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 = 5347;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5348;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5349;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5350;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5351;


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 = 5356) END FROM WidgetInst WHERE WidgetInstId = 5356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5360;


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 = 5357) END FROM WidgetInst WHERE WidgetInstId = 5357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5361;


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 = 5358) END FROM WidgetInst WHERE WidgetInstId = 5358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5362;


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 = 5359) END FROM WidgetInst WHERE WidgetInstId = 5359) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5363;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5368;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5369;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5370;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5371;


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 = 4952) END FROM WidgetInst WHERE WidgetInstId = 4952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5392;


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 = 4952) END FROM WidgetInst WHERE WidgetInstId = 4952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5393;


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 = 4952) END FROM WidgetInst WHERE WidgetInstId = 4952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5394;


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 = 4952) END FROM WidgetInst WHERE WidgetInstId = 4952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5395;


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 = 4952) END FROM WidgetInst WHERE WidgetInstId = 4952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5404;


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 = 4952) END FROM WidgetInst WHERE WidgetInstId = 4952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5405;


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 = 4952) END FROM WidgetInst WHERE WidgetInstId = 4952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5406;


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 = 4952) END FROM WidgetInst WHERE WidgetInstId = 4952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5407;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5416;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5417;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5418;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5419;


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 = 5424) END FROM WidgetInst WHERE WidgetInstId = 5424) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5428;


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 = 5425) END FROM WidgetInst WHERE WidgetInstId = 5425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5429;


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 = 5426) END FROM WidgetInst WHERE WidgetInstId = 5426) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5430;


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 = 5427) END FROM WidgetInst WHERE WidgetInstId = 5427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5431;


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 = 5424) END FROM WidgetInst WHERE WidgetInstId = 5424) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5440;


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 = 5425) END FROM WidgetInst WHERE WidgetInstId = 5425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5441;


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 = 5426) END FROM WidgetInst WHERE WidgetInstId = 5426) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5442;


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 = 5427) END FROM WidgetInst WHERE WidgetInstId = 5427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5443;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5452;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5453;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5454;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5455;


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 = 5460) END FROM WidgetInst WHERE WidgetInstId = 5460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5464;


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 = 5461) END FROM WidgetInst WHERE WidgetInstId = 5461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5465;


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 = 5462) END FROM WidgetInst WHERE WidgetInstId = 5462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5466;


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 = 5463) END FROM WidgetInst WHERE WidgetInstId = 5463) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5467;


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 = 5460) END FROM WidgetInst WHERE WidgetInstId = 5460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5476;


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 = 5461) END FROM WidgetInst WHERE WidgetInstId = 5461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5477;


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 = 5462) END FROM WidgetInst WHERE WidgetInstId = 5462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5478;


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 = 5463) END FROM WidgetInst WHERE WidgetInstId = 5463) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5479;


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 = 5460) END FROM WidgetInst WHERE WidgetInstId = 5460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5488;


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 = 5461) END FROM WidgetInst WHERE WidgetInstId = 5461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5489;


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 = 5462) END FROM WidgetInst WHERE WidgetInstId = 5462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5490;


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 = 5463) END FROM WidgetInst WHERE WidgetInstId = 5463) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5491;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5500;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5501;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5502;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5503;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5508) END FROM WidgetInst WHERE WidgetInstId = 5508)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5520;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5509) END FROM WidgetInst WHERE WidgetInstId = 5509)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5521;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5510) END FROM WidgetInst WHERE WidgetInstId = 5510)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5522;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5511) END FROM WidgetInst WHERE WidgetInstId = 5511)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5523;


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 = 5516) END FROM WidgetInst WHERE WidgetInstId = 5516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5532;


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 = 5517) END FROM WidgetInst WHERE WidgetInstId = 5517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5533;


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 = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5534;


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 = 5519) END FROM WidgetInst WHERE WidgetInstId = 5519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5535;


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 = 5516) END FROM WidgetInst WHERE WidgetInstId = 5516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5536;


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 = 5517) END FROM WidgetInst WHERE WidgetInstId = 5517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5537;


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 = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5538;


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 = 5519) END FROM WidgetInst WHERE WidgetInstId = 5519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5539;


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 = 5516) END FROM WidgetInst WHERE WidgetInstId = 5516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5548;


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 = 5517) END FROM WidgetInst WHERE WidgetInstId = 5517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5549;


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 = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5550;


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 = 5519) END FROM WidgetInst WHERE WidgetInstId = 5519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5551;


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 = 5516) END FROM WidgetInst WHERE WidgetInstId = 5516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5552;


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 = 5517) END FROM WidgetInst WHERE WidgetInstId = 5517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5553;


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 = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5554;


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 = 5519) END FROM WidgetInst WHERE WidgetInstId = 5519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5555;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5508) END FROM WidgetInst WHERE WidgetInstId = 5508)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5556;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5509) END FROM WidgetInst WHERE WidgetInstId = 5509)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5557;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5510) END FROM WidgetInst WHERE WidgetInstId = 5510)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5558;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5511) END FROM WidgetInst WHERE WidgetInstId = 5511)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5559;


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 = 5516) END FROM WidgetInst WHERE WidgetInstId = 5516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5568;


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 = 5517) END FROM WidgetInst WHERE WidgetInstId = 5517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5569;


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 = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5570;


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 = 5519) END FROM WidgetInst WHERE WidgetInstId = 5519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5571;


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 = 5516) END FROM WidgetInst WHERE WidgetInstId = 5516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5572;


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 = 5517) END FROM WidgetInst WHERE WidgetInstId = 5517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5573;


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 = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5574;


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 = 5519) END FROM WidgetInst WHERE WidgetInstId = 5519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5575;


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 = 5580) END FROM WidgetInst WHERE WidgetInstId = 5580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5584;


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 = 5581) END FROM WidgetInst WHERE WidgetInstId = 5581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5585;


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 = 5582) END FROM WidgetInst WHERE WidgetInstId = 5582) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5586;


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 = 5583) END FROM WidgetInst WHERE WidgetInstId = 5583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5587;


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 = 5516) END FROM WidgetInst WHERE WidgetInstId = 5516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5592;


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 = 5517) END FROM WidgetInst WHERE WidgetInstId = 5517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5593;


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 = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5594;


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 = 5519) END FROM WidgetInst WHERE WidgetInstId = 5519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5595;


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 = 5516) END FROM WidgetInst WHERE WidgetInstId = 5516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5596;


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 = 5517) END FROM WidgetInst WHERE WidgetInstId = 5517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5597;


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 = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5598;


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 = 5519) END FROM WidgetInst WHERE WidgetInstId = 5519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5599;


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 = 5580) END FROM WidgetInst WHERE WidgetInstId = 5580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5600;


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 = 5581) END FROM WidgetInst WHERE WidgetInstId = 5581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5601;


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 = 5582) END FROM WidgetInst WHERE WidgetInstId = 5582) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5602;


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 = 5583) END FROM WidgetInst WHERE WidgetInstId = 5583) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5603;


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 = 5516) END FROM WidgetInst WHERE WidgetInstId = 5516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5608;


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 = 5517) END FROM WidgetInst WHERE WidgetInstId = 5517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5609;


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 = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5610;


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 = 5519) END FROM WidgetInst WHERE WidgetInstId = 5519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5611;


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 = 5516) END FROM WidgetInst WHERE WidgetInstId = 5516) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5612;


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 = 5517) END FROM WidgetInst WHERE WidgetInstId = 5517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5613;


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 = 5518) END FROM WidgetInst WHERE WidgetInstId = 5518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5614;


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 = 5519) END FROM WidgetInst WHERE WidgetInstId = 5519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5615;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5616;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5617;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5618;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5619;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5628;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5629;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5630;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5631;


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 = 5760) END FROM WidgetInst WHERE WidgetInstId = 5760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5764;


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 = 5761) END FROM WidgetInst WHERE WidgetInstId = 5761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5765;


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 = 5762) END FROM WidgetInst WHERE WidgetInstId = 5762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5766;


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 = 5763) END FROM WidgetInst WHERE WidgetInstId = 5763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5767;


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 = 5760) END FROM WidgetInst WHERE WidgetInstId = 5760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5772;


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 = 5761) END FROM WidgetInst WHERE WidgetInstId = 5761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5773;


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 = 5762) END FROM WidgetInst WHERE WidgetInstId = 5762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5774;


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 = 5763) END FROM WidgetInst WHERE WidgetInstId = 5763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5775;


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 = 5760) END FROM WidgetInst WHERE WidgetInstId = 5760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5780;


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 = 5761) END FROM WidgetInst WHERE WidgetInstId = 5761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5781;


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 = 5762) END FROM WidgetInst WHERE WidgetInstId = 5762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5782;


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 = 5763) END FROM WidgetInst WHERE WidgetInstId = 5763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5783;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5788;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5789;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5790;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5791;


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 = 5824) END FROM WidgetInst WHERE WidgetInstId = 5824) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5828;


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 = 5825) END FROM WidgetInst WHERE WidgetInstId = 5825) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5829;


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 = 5826) END FROM WidgetInst WHERE WidgetInstId = 5826) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5830;


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 = 5827) END FROM WidgetInst WHERE WidgetInstId = 5827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5831;


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 = 5824) END FROM WidgetInst WHERE WidgetInstId = 5824) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5836;


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 = 5825) END FROM WidgetInst WHERE WidgetInstId = 5825) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5837;


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 = 5826) END FROM WidgetInst WHERE WidgetInstId = 5826) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5838;


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 = 5827) END FROM WidgetInst WHERE WidgetInstId = 5827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5839;


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 = 5824) END FROM WidgetInst WHERE WidgetInstId = 5824) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5844;


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 = 5825) END FROM WidgetInst WHERE WidgetInstId = 5825) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5845;


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 = 5826) END FROM WidgetInst WHERE WidgetInstId = 5826) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5846;


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 = 5827) END FROM WidgetInst WHERE WidgetInstId = 5827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5847;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5852;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5853;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5854;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5855;


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 = 5904) END FROM WidgetInst WHERE WidgetInstId = 5904) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5908;


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 = 5905) END FROM WidgetInst WHERE WidgetInstId = 5905) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5909;


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 = 5906) END FROM WidgetInst WHERE WidgetInstId = 5906) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5910;


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 = 5907) END FROM WidgetInst WHERE WidgetInstId = 5907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5911;


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 = 5904) END FROM WidgetInst WHERE WidgetInstId = 5904) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5916;


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 = 5905) END FROM WidgetInst WHERE WidgetInstId = 5905) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5917;


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 = 5906) END FROM WidgetInst WHERE WidgetInstId = 5906) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5918;


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 = 5907) END FROM WidgetInst WHERE WidgetInstId = 5907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5919;


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 = 5904) END FROM WidgetInst WHERE WidgetInstId = 5904) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5924;


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 = 5905) END FROM WidgetInst WHERE WidgetInstId = 5905) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5925;


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 = 5906) END FROM WidgetInst WHERE WidgetInstId = 5906) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5926;


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 = 5907) END FROM WidgetInst WHERE WidgetInstId = 5907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5927;


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 = 5344) END FROM WidgetInst WHERE WidgetInstId = 5344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5932;


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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5933;


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 = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5934;


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 = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5935;


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 = 5984) END FROM WidgetInst WHERE WidgetInstId = 5984) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5988;


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 = 5985) END FROM WidgetInst WHERE WidgetInstId = 5985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5989;


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 = 5986) END FROM WidgetInst WHERE WidgetInstId = 5986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5990;


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 = 5987) END FROM WidgetInst WHERE WidgetInstId = 5987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5991;


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 = 5984) END FROM WidgetInst WHERE WidgetInstId = 5984) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5996;


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 = 5985) END FROM WidgetInst WHERE WidgetInstId = 5985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5997;


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 = 5986) END FROM WidgetInst WHERE WidgetInstId = 5986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5998;


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 = 5987) END FROM WidgetInst WHERE WidgetInstId = 5987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5999;


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 = 5984) END FROM WidgetInst WHERE WidgetInstId = 5984) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6004;


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 = 5985) END FROM WidgetInst WHERE WidgetInstId = 5985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6005;


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 = 5986) END FROM WidgetInst WHERE WidgetInstId = 5986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6006;


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 = 5987) END FROM WidgetInst WHERE WidgetInstId = 5987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6007;


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 = 6008) END FROM WidgetInst WHERE WidgetInstId = 6008) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5984) END FROM WidgetInst WHERE WidgetInstId = 5984)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6012;


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 = 6009) END FROM WidgetInst WHERE WidgetInstId = 6009) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5985) END FROM WidgetInst WHERE WidgetInstId = 5985)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6013;


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 = 6010) END FROM WidgetInst WHERE WidgetInstId = 6010) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5986) END FROM WidgetInst WHERE WidgetInstId = 5986)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6014;


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 = 6011) END FROM WidgetInst WHERE WidgetInstId = 6011) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5987) END FROM WidgetInst WHERE WidgetInstId = 5987)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6015;


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 = 6008) END FROM WidgetInst WHERE WidgetInstId = 6008) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5984) END FROM WidgetInst WHERE WidgetInstId = 5984)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6020;


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 = 6009) END FROM WidgetInst WHERE WidgetInstId = 6009) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5985) END FROM WidgetInst WHERE WidgetInstId = 5985)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6021;


