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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 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 = 'Depth Varied' AND WidgetInstId = 14) END FROM WidgetInst WHERE WidgetInstId = 14) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 32;


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


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


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


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


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


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 = 47) END FROM WidgetInst WHERE WidgetInstId = 47) = 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 = 'Mixed' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 56;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 60) END FROM WidgetInst WHERE WidgetInstId = 60) = 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 = 62) END FROM WidgetInst WHERE WidgetInstId = 62) = 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 = 'Parker' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'Parker' AND WidgetInstId = 60) END FROM WidgetInst WHERE WidgetInstId = 60) = 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 = 'Parker' AND WidgetInstId = 62) END FROM WidgetInst WHERE WidgetInstId = 62) = 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 = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 60) END FROM WidgetInst WHERE WidgetInstId = 60) = 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 = 62) END FROM WidgetInst WHERE WidgetInstId = 62) = 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 = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 60) END FROM WidgetInst WHERE WidgetInstId = 60) = 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 = 62) END FROM WidgetInst WHERE WidgetInstId = 62) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 60) END FROM WidgetInst WHERE WidgetInstId = 60) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 62) END FROM WidgetInst WHERE WidgetInstId = 62) = 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 = 'Wu-et-al' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'Wu-et-al' AND WidgetInstId = 60) END FROM WidgetInst WHERE WidgetInstId = 60) = 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 = 'Wu-et-al' AND WidgetInstId = 62) END FROM WidgetInst WHERE WidgetInstId = 62) = 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 = 'Meyer-Peter-Muller' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'Meyer-Peter-Muller' AND WidgetInstId = 60) END FROM WidgetInst WHERE WidgetInstId = 60) = 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 = 'Meyer-Peter-Muller' AND WidgetInstId = 62) END FROM WidgetInst WHERE WidgetInstId = 62) = 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 = 'Trinity' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'Trinity' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'Trinity' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'Aw' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'Rijn' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'Seminara' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'Seminara' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 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 = 'User defined' AND WidgetInstId = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 122;


Query:
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 = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 124;


Query:
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 = 55) END FROM WidgetInst WHERE WidgetInstId = 55) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 126;


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


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


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


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


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


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


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


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


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


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


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


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 = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 189) END FROM WidgetInst WHERE WidgetInstId = 189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 190;


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


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 = 189) END FROM WidgetInst WHERE WidgetInstId = 189) = 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 = 44) END FROM WidgetInst WHERE WidgetInstId = 44) = 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 = '(none selected)' AND WidgetInstId = 44) END FROM WidgetInst WHERE WidgetInstId = 44) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 189) END FROM WidgetInst WHERE WidgetInstId = 189) = 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 = 'Constant' AND WidgetInstId = 209) END FROM WidgetInst WHERE WidgetInstId = 209) = 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 = 'Time Series' AND WidgetInstId = 209) END FROM WidgetInst WHERE WidgetInstId = 209) = 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 189) END FROM WidgetInst WHERE WidgetInstId = 189) = 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 = 'Constant' AND WidgetInstId = 218) END FROM WidgetInst WHERE WidgetInstId = 218) = 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 = 'Time Series' AND WidgetInstId = 218) END FROM WidgetInst WHERE WidgetInstId = 218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 222;


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 232) END FROM WidgetInst WHERE WidgetInstId = 232) = 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 = 'Metric' AND WidgetInstId = 232) END FROM WidgetInst WHERE WidgetInstId = 232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 232) END FROM WidgetInst WHERE WidgetInstId = 232) = 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 = 'Metric' AND WidgetInstId = 232) END FROM WidgetInst WHERE WidgetInstId = 232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 241;


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 293) END FROM WidgetInst WHERE WidgetInstId = 293) = 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 = 293) END FROM WidgetInst WHERE WidgetInstId = 293) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 296;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 309) END FROM WidgetInst WHERE WidgetInstId = 309) = 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 = 309) END FROM WidgetInst WHERE WidgetInstId = 309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 312;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 329) END FROM WidgetInst WHERE WidgetInstId = 329) = 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 TextValues WHERE Value = 'user' AND WidgetInstId = 329) END FROM WidgetInst WHERE WidgetInstId = 329) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 332;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 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 = 444) END FROM WidgetInst WHERE WidgetInstId = 444) = 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 = 'On' AND WidgetInstId = 445) END FROM WidgetInst WHERE WidgetInstId = 445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 448;


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


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


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


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


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


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


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


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


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


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 = 436) END FROM WidgetInst WHERE WidgetInstId = 436) = 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 = 'Constant' AND WidgetInstId = 494) END FROM WidgetInst WHERE WidgetInstId = 494) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 497;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 434) END FROM WidgetInst WHERE WidgetInstId = 434) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 435) END FROM WidgetInst WHERE WidgetInstId = 435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 552;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 565) END FROM WidgetInst WHERE WidgetInstId = 565) = 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 = 563) END FROM WidgetInst WHERE WidgetInstId = 563) = 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 = 'Metric' AND WidgetInstId = 564) END FROM WidgetInst WHERE WidgetInstId = 564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 624;


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


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


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


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


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


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


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 = 565) END FROM WidgetInst WHERE WidgetInstId = 565) = 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 = 'Metric' AND WidgetInstId = 563) END FROM WidgetInst WHERE WidgetInstId = 563) = 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 = 564) END FROM WidgetInst WHERE WidgetInstId = 564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 636;


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


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 = 434) END FROM WidgetInst WHERE WidgetInstId = 434) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 435) END FROM WidgetInst WHERE WidgetInstId = 435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 639;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 855) END FROM WidgetInst WHERE WidgetInstId = 855) = 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 = 856) END FROM WidgetInst WHERE WidgetInstId = 856) = 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 = 854) END FROM WidgetInst WHERE WidgetInstId = 854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 863;


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


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


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


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


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


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 = 434) END FROM WidgetInst WHERE WidgetInstId = 434) = 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 = 'Pressure' AND WidgetInstId = 435) END FROM WidgetInst WHERE WidgetInstId = 435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 876;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 1143) END FROM WidgetInst WHERE WidgetInstId = 1143) = 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 = 'File' AND WidgetInstId = 1144) END FROM WidgetInst WHERE WidgetInstId = 1144) = 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 = 'Constant' AND WidgetInstId = 1152) END FROM WidgetInst WHERE WidgetInstId = 1152) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1153;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 1240) END FROM WidgetInst WHERE WidgetInstId = 1240) = 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 = 'Depth Varied' AND WidgetInstId = 1241) END FROM WidgetInst WHERE WidgetInstId = 1241) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1256;


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


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


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


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


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


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


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


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


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


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


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


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


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 = 1277) END FROM WidgetInst WHERE WidgetInstId = 1277) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 1282) END FROM WidgetInst WHERE WidgetInstId = 1282) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1300;


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 1282) END FROM WidgetInst WHERE WidgetInstId = 1282) = 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 = 'Wu-et-al' AND WidgetInstId = 1284) END FROM WidgetInst WHERE WidgetInstId = 1284) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1320;


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


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


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


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


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


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 = 1277) END FROM WidgetInst WHERE WidgetInstId = 1277) = 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 = 'Rijn' AND WidgetInstId = 1277) END FROM WidgetInst WHERE WidgetInstId = 1277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1336;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 1277) END FROM WidgetInst WHERE WidgetInstId = 1277) = 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 = 'User defined' AND WidgetInstId = 1277) END FROM WidgetInst WHERE WidgetInstId = 1277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1344;


Query:
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 = 1277) END FROM WidgetInst WHERE WidgetInstId = 1277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1346;


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 1411) END FROM WidgetInst WHERE WidgetInstId = 1411) = 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 = 'On' AND WidgetInstId = 1414) END FROM WidgetInst WHERE WidgetInstId = 1414) = 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 = 'Culvert HY-8' AND WidgetInstId = 1411) END FROM WidgetInst WHERE WidgetInstId = 1411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1417;


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1431) END FROM WidgetInst WHERE WidgetInstId = 1431) = 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 = 'Time Series' 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1411) END FROM WidgetInst WHERE WidgetInstId = 1411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1438;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1610) END FROM WidgetInst WHERE WidgetInstId = 1610) = 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 = 'Weir' AND WidgetInstId = 1610) END FROM WidgetInst WHERE WidgetInstId = 1610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1617;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 1660) END FROM WidgetInst WHERE WidgetInstId = 1660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1665;


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


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


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


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


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 = 1675) END FROM WidgetInst WHERE WidgetInstId = 1675) = 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 = 'On' AND WidgetInstId = 1676) END FROM WidgetInst WHERE WidgetInstId = 1676) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1677) END FROM WidgetInst WHERE WidgetInstId = 1677) = 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 = 'On' AND WidgetInstId = 1678) END FROM WidgetInst WHERE WidgetInstId = 1678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1679) END FROM WidgetInst WHERE WidgetInstId = 1679) = 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 = 'Culvert HY-8' AND WidgetInstId = 1660) END FROM WidgetInst WHERE WidgetInstId = 1660) = 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 = 'Culvert HY-8' AND WidgetInstId = 1661) END FROM WidgetInst WHERE WidgetInstId = 1661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1691;


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 = 1662) END FROM WidgetInst WHERE WidgetInstId = 1662) = 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 = 'Culvert HY-8' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1693;


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1761) END FROM WidgetInst WHERE WidgetInstId = 1761) = 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 = 'Constant' AND WidgetInstId = 1762) END FROM WidgetInst WHERE WidgetInstId = 1762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1763) END FROM WidgetInst WHERE WidgetInstId = 1763) = 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 = 'Constant' AND WidgetInstId = 1764) END FROM WidgetInst WHERE WidgetInstId = 1764) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1769;


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1664) END FROM WidgetInst WHERE WidgetInstId = 1664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1799;


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


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


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 = 1807) END FROM WidgetInst WHERE WidgetInstId = 1807) = 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 = 'Constant' AND WidgetInstId = 1808) END FROM WidgetInst WHERE WidgetInstId = 1808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1813;


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


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


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


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


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


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


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 = 1806) END FROM WidgetInst WHERE WidgetInstId = 1806) = 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 = 'Rating Curve' AND WidgetInstId = 1807) END FROM WidgetInst WHERE WidgetInstId = 1807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1842;


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


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 = 1809) END FROM WidgetInst WHERE WidgetInstId = 1809) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1660) END FROM WidgetInst WHERE WidgetInstId = 1660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1855;


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


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 = 1662) END FROM WidgetInst WHERE WidgetInstId = 1662) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1858;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 1879) END FROM WidgetInst WHERE WidgetInstId = 1879) = 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 TextValues WHERE Value = 'Metric' AND WidgetInstId = 1875) END FROM WidgetInst WHERE WidgetInstId = 1875) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1945;


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


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


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


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


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 = 1955) END FROM WidgetInst WHERE WidgetInstId = 1955) = 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 TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1956) END FROM WidgetInst WHERE WidgetInstId = 1956) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1961;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 1660) END FROM WidgetInst WHERE WidgetInstId = 1660) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1661) END FROM WidgetInst WHERE WidgetInstId = 1661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2001;


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


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1664) END FROM WidgetInst WHERE WidgetInstId = 1664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2004;


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2183) END FROM WidgetInst WHERE WidgetInstId = 2183) = 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 = 'user' AND WidgetInstId = 2184) END FROM WidgetInst WHERE WidgetInstId = 2184) = 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 = 'user' AND WidgetInstId = 2180) END FROM WidgetInst WHERE WidgetInstId = 2180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2195;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2263) END FROM WidgetInst WHERE WidgetInstId = 2263) = 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 = 'user' AND WidgetInstId = 2264) END FROM WidgetInst WHERE WidgetInstId = 2264) = 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 = 'user' AND WidgetInstId = 2260) END FROM WidgetInst WHERE WidgetInstId = 2260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2275;


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2260) END FROM WidgetInst WHERE WidgetInstId = 2260) = 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 = 'user' AND WidgetInstId = 2261) END FROM WidgetInst WHERE WidgetInstId = 2261) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2286;


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


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


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


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


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 = 1661) END FROM WidgetInst WHERE WidgetInstId = 1661) = 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 = 'Gate' AND WidgetInstId = 1662) END FROM WidgetInst WHERE WidgetInstId = 1662) = 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 = 'Gate' AND WidgetInstId = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2298;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2463) END FROM WidgetInst WHERE WidgetInstId = 2463) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 2464) END FROM WidgetInst WHERE WidgetInstId = 2464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2489;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 1663) END FROM WidgetInst WHERE WidgetInstId = 1663) = 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 = 'Internal sink' AND WidgetInstId = 1664) END FROM WidgetInst WHERE WidgetInstId = 1664) = 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 = 'Constant' AND WidgetInstId = 2535) END FROM WidgetInst WHERE WidgetInstId = 2535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2540;


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 2535) END FROM WidgetInst WHERE WidgetInstId = 2535) = 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 = 'Rating curve' AND WidgetInstId = 2536) END FROM WidgetInst WHERE WidgetInstId = 2536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2626;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2658) END FROM WidgetInst WHERE WidgetInstId = 2658) = 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 = 'Rating curve' AND WidgetInstId = 2659) END FROM WidgetInst WHERE WidgetInstId = 2659) = 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 = 'Specified' AND WidgetInstId = 2765) END FROM WidgetInst WHERE WidgetInstId = 2765) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2770;


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 2767) END FROM WidgetInst WHERE WidgetInstId = 2767) = 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 = 'Specified' AND WidgetInstId = 2768) END FROM WidgetInst WHERE WidgetInstId = 2768) = 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 = 'Specified' AND WidgetInstId = 2769) END FROM WidgetInst WHERE WidgetInstId = 2769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2774;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 2840) END FROM WidgetInst WHERE WidgetInstId = 2840) = 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 = 'File' AND WidgetInstId = 2841) END FROM WidgetInst WHERE WidgetInstId = 2841) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2846;


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


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


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


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


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


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


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


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


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 = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 2857) END FROM WidgetInst WHERE WidgetInstId = 2857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2858;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2961) END FROM WidgetInst WHERE WidgetInstId = 2961) = 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 = 'user' AND WidgetInstId = 2961) END FROM WidgetInst WHERE WidgetInstId = 2961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2966;


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2997) END FROM WidgetInst WHERE WidgetInstId = 2997) = 1 THEN 1 ELSE 0 END WHERE 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 = 'Pressure' AND WidgetInstId = 2857) END FROM WidgetInst WHERE WidgetInstId = 2857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3004;


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3032) END FROM WidgetInst WHERE WidgetInstId = 3032) = 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 = 'Link' AND WidgetInstId = 2857) END FROM WidgetInst WHERE WidgetInstId = 2857) = 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 = 'Constant' AND WidgetInstId = 3056) END FROM WidgetInst WHERE WidgetInstId = 3056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3057;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 3134) END FROM WidgetInst WHERE WidgetInstId = 3134) = 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 TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3135) END FROM WidgetInst WHERE WidgetInstId = 3135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3150;


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


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 = 3160) END FROM WidgetInst WHERE WidgetInstId = 3160) = 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 TextValues WHERE Value = 'Mixed' AND WidgetInstId = 3168) END FROM WidgetInst WHERE WidgetInstId = 3168) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3169;


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


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


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 = 3175) END FROM WidgetInst WHERE WidgetInstId = 3175) = 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 = 'Parker' AND WidgetInstId = 3168) END FROM WidgetInst WHERE WidgetInstId = 3168) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3183;


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 3168) END FROM WidgetInst WHERE WidgetInstId = 3168) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 3173) END FROM WidgetInst WHERE WidgetInstId = 3173) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3197;


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


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


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


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 = 3175) END FROM WidgetInst WHERE WidgetInstId = 3175) = 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 = 'Wu-et-al' AND WidgetInstId = 3168) END FROM WidgetInst WHERE WidgetInstId = 3168) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3207;


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


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


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


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


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


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


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


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


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


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


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


Query:
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 = 3168) END FROM WidgetInst WHERE WidgetInstId = 3168) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3233;


Query:
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 = 3168) END FROM WidgetInst WHERE WidgetInstId = 3168) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3235;


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


Query:
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 = 3168) END FROM WidgetInst WHERE WidgetInstId = 3168) = 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 Length' AND WidgetInstId = 3252) END FROM WidgetInst WHERE WidgetInstId = 3252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3253;


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' 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 = 'Culvert HY-8' AND WidgetInstId = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 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 != '(none selected)' AND WidgetInstId = 44) END FROM WidgetInst WHERE WidgetInstId = 44) = 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 = '(none selected)' AND WidgetInstId = 44) END FROM WidgetInst WHERE WidgetInstId = 44) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3317;


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


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


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


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


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 = 3331) END FROM WidgetInst WHERE WidgetInstId = 3331) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3341;


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3361) END FROM WidgetInst WHERE WidgetInstId = 3361) = 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 = 'U.S. Customary' AND WidgetInstId = 3345) END FROM WidgetInst WHERE WidgetInstId = 3345) = 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 = 'Metric' AND WidgetInstId = 3345) END FROM WidgetInst WHERE WidgetInstId = 3345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3365;


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3406) END FROM WidgetInst WHERE WidgetInstId = 3406) = 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 = 'Weir' AND WidgetInstId = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3413;


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3442) END FROM WidgetInst WHERE WidgetInstId = 3442) = 1 THEN 1 ELSE 0 END WHERE 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 = 'Pressure' AND WidgetInstId = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3449;


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


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


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


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


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


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


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


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


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


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 = 3477) END FROM WidgetInst WHERE WidgetInstId = 3477) = 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 = 'Link' AND WidgetInstId = 3302) END FROM WidgetInst WHERE WidgetInstId = 3302) = 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 = 'Constant' AND WidgetInstId = 3501) END FROM WidgetInst WHERE WidgetInstId = 3501) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3502;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 3559;


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 = 3559;


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 = 3559;


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 = 3559;


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 = 3559;


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 = 3559;


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 = 3560;


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 = 3560;


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 = 3560;


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 = 3560;


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 = 3560;


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 = 3560;


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 = 3561;


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 = 3561;


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 = 3561;


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 = 3561;


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 = 3561;


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 = 3561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3562;


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 = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3563;


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 = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 3558) END FROM WidgetInst WHERE WidgetInstId = 3558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3565;


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 = 3559) END FROM WidgetInst WHERE WidgetInstId = 3559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3566;


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 = 3560) END FROM WidgetInst WHERE WidgetInstId = 3560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 3561) END FROM WidgetInst WHERE WidgetInstId = 3561) = 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 = 'On' AND WidgetInstId = 3576) END FROM WidgetInst WHERE WidgetInstId = 3576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3583;


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 = 3577) END FROM WidgetInst WHERE WidgetInstId = 3577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 3578) END FROM WidgetInst WHERE WidgetInstId = 3578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 3579) END FROM WidgetInst WHERE WidgetInstId = 3579) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3586;


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 = 3580) END FROM WidgetInst WHERE WidgetInstId = 3580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3587;


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 = 3581) END FROM WidgetInst WHERE WidgetInstId = 3581) = 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 = 'On' AND WidgetInstId = 3582) END FROM WidgetInst WHERE WidgetInstId = 3582) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3589;


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 = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3598;


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 = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 3558) END FROM WidgetInst WHERE WidgetInstId = 3558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3600;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 3559) END FROM WidgetInst WHERE WidgetInstId = 3559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 3560) END FROM WidgetInst WHERE WidgetInstId = 3560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3602;


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 = 3561) END FROM WidgetInst WHERE WidgetInstId = 3561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3639;


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 = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 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 != '(none selected)' AND WidgetInstId = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3641;


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 = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 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 != '(none selected)' AND WidgetInstId = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3645;


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 = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3661;


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 = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3663;


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 = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 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 = '(none selected)' AND WidgetInstId = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3665;


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 = 3157) END FROM WidgetInst WHERE WidgetInstId = 3157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3666;


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 = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3683;


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 = 3558) END FROM WidgetInst WHERE WidgetInstId = 3558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3559) END FROM WidgetInst WHERE WidgetInstId = 3559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3685;


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 = 3560) END FROM WidgetInst WHERE WidgetInstId = 3560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3686;


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 = 3561) END FROM WidgetInst WHERE WidgetInstId = 3561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3687;


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 = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3702;


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 = 3696) END FROM WidgetInst WHERE WidgetInstId = 3696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3703;


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 = 3697) END FROM WidgetInst WHERE WidgetInstId = 3697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3704;


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 = 3698) END FROM WidgetInst WHERE WidgetInstId = 3698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3705;


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 = 3699) END FROM WidgetInst WHERE WidgetInstId = 3699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3706;


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 = 3700) END FROM WidgetInst WHERE WidgetInstId = 3700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3707;


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 = 3701) END FROM WidgetInst WHERE WidgetInstId = 3701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3708;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3695) END FROM WidgetInst WHERE WidgetInstId = 3695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3723;


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 = 3696) END FROM WidgetInst WHERE WidgetInstId = 3696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3724;


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 = 3697) END FROM WidgetInst WHERE WidgetInstId = 3697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3725;


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 = 3698) END FROM WidgetInst WHERE WidgetInstId = 3698) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3726;


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 = 3699) END FROM WidgetInst WHERE WidgetInstId = 3699) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3727;


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 = 3700) END FROM WidgetInst WHERE WidgetInstId = 3700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3728;


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 = 3701) END FROM WidgetInst WHERE WidgetInstId = 3701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3729;


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 = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3744;


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 = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3745;


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 = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3746;


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 = 3558) END FROM WidgetInst WHERE WidgetInstId = 3558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3747;


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 = 3559) END FROM WidgetInst WHERE WidgetInstId = 3559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3748;


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 = 3560) END FROM WidgetInst WHERE WidgetInstId = 3560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3749;


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 = 3561) END FROM WidgetInst WHERE WidgetInstId = 3561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3750;


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 = 3758) END FROM WidgetInst WHERE WidgetInstId = 3758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3759) END FROM WidgetInst WHERE WidgetInstId = 3759) = 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 = 'Constant' AND WidgetInstId = 3760) END FROM WidgetInst WHERE WidgetInstId = 3760) = 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 = 3761) END FROM WidgetInst WHERE WidgetInstId = 3761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3768;


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 = 3762) END FROM WidgetInst WHERE WidgetInstId = 3762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3769;


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 = 3763) END FROM WidgetInst WHERE WidgetInstId = 3763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3770;


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 = 3764) END FROM WidgetInst WHERE WidgetInstId = 3764) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3758) END FROM WidgetInst WHERE WidgetInstId = 3758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3786;


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 = 3759) END FROM WidgetInst WHERE WidgetInstId = 3759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3787;


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 = 3760) END FROM WidgetInst WHERE WidgetInstId = 3760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3761) END FROM WidgetInst WHERE WidgetInstId = 3761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3762) END FROM WidgetInst WHERE WidgetInstId = 3762) = 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 = 3763) END FROM WidgetInst WHERE WidgetInstId = 3763) = 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 = 'Time Series' AND WidgetInstId = 3764) END FROM WidgetInst WHERE WidgetInstId = 3764) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3758) END FROM WidgetInst WHERE WidgetInstId = 3758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3807;


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 = 3759) END FROM WidgetInst WHERE WidgetInstId = 3759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3808;


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 = 3760) END FROM WidgetInst WHERE WidgetInstId = 3760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3809;


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 = 3761) END FROM WidgetInst WHERE WidgetInstId = 3761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3762) END FROM WidgetInst WHERE WidgetInstId = 3762) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3763) END FROM WidgetInst WHERE WidgetInstId = 3763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3812;


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 = 3764) END FROM WidgetInst WHERE WidgetInstId = 3764) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3813;


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 = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3830;


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 = 3558) END FROM WidgetInst WHERE WidgetInstId = 3558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3831;


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 = 3559) END FROM WidgetInst WHERE WidgetInstId = 3559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3832;


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 = 3560) END FROM WidgetInst WHERE WidgetInstId = 3560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3833;


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 = 3561) END FROM WidgetInst WHERE WidgetInstId = 3561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3834;


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 = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3842) END FROM WidgetInst WHERE WidgetInstId = 3842)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3863;


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 = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3843) END FROM WidgetInst WHERE WidgetInstId = 3843)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3864;


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 = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3844) END FROM WidgetInst WHERE WidgetInstId = 3844)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3865;


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 = 3558) END FROM WidgetInst WHERE WidgetInstId = 3558) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3845) END FROM WidgetInst WHERE WidgetInstId = 3845)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3866;


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 = 3559) END FROM WidgetInst WHERE WidgetInstId = 3559) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3846) END FROM WidgetInst WHERE WidgetInstId = 3846)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3867;


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 = 3560) END FROM WidgetInst WHERE WidgetInstId = 3560) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3847) END FROM WidgetInst WHERE WidgetInstId = 3847)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3561) END FROM WidgetInst WHERE WidgetInstId = 3561) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3848) END FROM WidgetInst WHERE WidgetInstId = 3848)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3856) END FROM WidgetInst WHERE WidgetInstId = 3856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3885;


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 = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 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 = 'U.S. Customary' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 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 = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3888;


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 = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3889;


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 = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3890;


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 = 3856) END FROM WidgetInst WHERE WidgetInstId = 3856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3891;


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 = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3896;


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 = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3897;


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 = 3856) END FROM WidgetInst WHERE WidgetInstId = 3856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 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 = 'Metric' AND WidgetInstId = 3856) END FROM WidgetInst WHERE WidgetInstId = 3856) = 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 = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3920;


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 = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3921;


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 = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 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 = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 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 = 'Metric' AND WidgetInstId = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3924;


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 = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3925;


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 = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3842) END FROM WidgetInst WHERE WidgetInstId = 3842)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3926;


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 = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3843) END FROM WidgetInst WHERE WidgetInstId = 3843)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3927;


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 = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3844) END FROM WidgetInst WHERE WidgetInstId = 3844)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3928;


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 = 3558) END FROM WidgetInst WHERE WidgetInstId = 3558) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3845) END FROM WidgetInst WHERE WidgetInstId = 3845)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3929;


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 = 3559) END FROM WidgetInst WHERE WidgetInstId = 3559) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3846) END FROM WidgetInst WHERE WidgetInstId = 3846)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3930;


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 = 3560) END FROM WidgetInst WHERE WidgetInstId = 3560) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3847) END FROM WidgetInst WHERE WidgetInstId = 3847)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3931;


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 = 3561) END FROM WidgetInst WHERE WidgetInstId = 3561) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3848) END FROM WidgetInst WHERE WidgetInstId = 3848)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3932;


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 = 3856) END FROM WidgetInst WHERE WidgetInstId = 3856) = 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 = 'U.S. Customary' AND WidgetInstId = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3948;


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 = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3949;


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 = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 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 = 'U.S. Customary' AND WidgetInstId = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 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 = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3952;


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 = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3953;


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 = 3856) END FROM WidgetInst WHERE WidgetInstId = 3856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3954;


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 = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3955;


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 = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3956;


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 = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3957;


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 = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 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 = 'Metric' AND WidgetInstId = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 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 = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3960;


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 = 3968) END FROM WidgetInst WHERE WidgetInstId = 3968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3975;


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 = 3969) END FROM WidgetInst WHERE WidgetInstId = 3969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3976;


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 = 3970) END FROM WidgetInst WHERE WidgetInstId = 3970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3977;


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 = 3971) END FROM WidgetInst WHERE WidgetInstId = 3971) = 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 = 'Time Series' AND WidgetInstId = 3972) END FROM WidgetInst WHERE WidgetInstId = 3972) = 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 = 'Time Series' AND WidgetInstId = 3973) END FROM WidgetInst WHERE WidgetInstId = 3973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3980;


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 = 3974) END FROM WidgetInst WHERE WidgetInstId = 3974) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3981;


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 = 3856) END FROM WidgetInst WHERE WidgetInstId = 3856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3989;


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 = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3992;


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 = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3993;


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 = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3856) END FROM WidgetInst WHERE WidgetInstId = 3856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3996;


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 = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3997;


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 = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4000;


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 = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4001;


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 = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3968) END FROM WidgetInst WHERE WidgetInstId = 3968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3969) END FROM WidgetInst WHERE WidgetInstId = 3969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4004;


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 = 3970) END FROM WidgetInst WHERE WidgetInstId = 3970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4005;


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 = 3971) END FROM WidgetInst WHERE WidgetInstId = 3971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4006;


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 = 3972) END FROM WidgetInst WHERE WidgetInstId = 3972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4007;


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 = 3973) END FROM WidgetInst WHERE WidgetInstId = 3973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4008;


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 = 3974) END FROM WidgetInst WHERE WidgetInstId = 3974) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4009;


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 = 3856) END FROM WidgetInst WHERE WidgetInstId = 3856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4017;


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 = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4018;


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 = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4019;


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 = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4020;


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 = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4021;


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 = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3856) END FROM WidgetInst WHERE WidgetInstId = 3856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4024;


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 = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4025;


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 = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4028;


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 = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4029;


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 = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4032;


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 = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4033;


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 = 3558) END FROM WidgetInst WHERE WidgetInstId = 3558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3559) END FROM WidgetInst WHERE WidgetInstId = 3559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3560) END FROM WidgetInst WHERE WidgetInstId = 3560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4036;


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 = 3561) END FROM WidgetInst WHERE WidgetInstId = 3561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4037;


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 = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4052;


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 = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4053;


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 = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4054;


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 = 3558) END FROM WidgetInst WHERE WidgetInstId = 3558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4055;


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 = 3559) END FROM WidgetInst WHERE WidgetInstId = 3559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4056;


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 = 3560) END FROM WidgetInst WHERE WidgetInstId = 3560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4057;


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 = 3561) END FROM WidgetInst WHERE WidgetInstId = 3561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4283) END FROM WidgetInst WHERE WidgetInstId = 4283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4284) END FROM WidgetInst WHERE WidgetInstId = 4284) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4285) END FROM WidgetInst WHERE WidgetInstId = 4285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4286) END FROM WidgetInst WHERE WidgetInstId = 4286) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4287) END FROM WidgetInst WHERE WidgetInstId = 4287) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4288) END FROM WidgetInst WHERE WidgetInstId = 4288) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4289) END FROM WidgetInst WHERE WidgetInstId = 4289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4296;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4283) END FROM WidgetInst WHERE WidgetInstId = 4283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4284) END FROM WidgetInst WHERE WidgetInstId = 4284) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4285) END FROM WidgetInst WHERE WidgetInstId = 4285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4306;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4286) END FROM WidgetInst WHERE WidgetInstId = 4286) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4287) END FROM WidgetInst WHERE WidgetInstId = 4287) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4308;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4288) END FROM WidgetInst WHERE WidgetInstId = 4288) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4289) END FROM WidgetInst WHERE WidgetInstId = 4289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4283) END FROM WidgetInst WHERE WidgetInstId = 4283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4284) END FROM WidgetInst WHERE WidgetInstId = 4284) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4285) END FROM WidgetInst WHERE WidgetInstId = 4285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4286) END FROM WidgetInst WHERE WidgetInstId = 4286) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4287) END FROM WidgetInst WHERE WidgetInstId = 4287) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4288) END FROM WidgetInst WHERE WidgetInstId = 4288) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4289) END FROM WidgetInst WHERE WidgetInstId = 4289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4324;


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 = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4332;


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 = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4333;


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 = 3557) END FROM WidgetInst WHERE WidgetInstId = 3557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4334;


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 = 3558) END FROM WidgetInst WHERE WidgetInstId = 3558) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4335;


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 = 3559) END FROM WidgetInst WHERE WidgetInstId = 3559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4336;


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 = 3560) END FROM WidgetInst WHERE WidgetInstId = 3560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4337;


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 = 3561) END FROM WidgetInst WHERE WidgetInstId = 3561) = 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 TextValues WHERE Value = 'user' AND WidgetInstId = 4395) END FROM WidgetInst WHERE WidgetInstId = 4395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4396) END FROM WidgetInst WHERE WidgetInstId = 4396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4397) END FROM WidgetInst WHERE WidgetInstId = 4397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4398) END FROM WidgetInst WHERE WidgetInstId = 4398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4399) END FROM WidgetInst WHERE WidgetInstId = 4399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4400) END FROM WidgetInst WHERE WidgetInstId = 4400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4401) END FROM WidgetInst WHERE WidgetInstId = 4401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4395) END FROM WidgetInst WHERE WidgetInstId = 4395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4396) END FROM WidgetInst WHERE WidgetInstId = 4396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4397) END FROM WidgetInst WHERE WidgetInstId = 4397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4398) END FROM WidgetInst WHERE WidgetInstId = 4398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4399) END FROM WidgetInst WHERE WidgetInstId = 4399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4400) END FROM WidgetInst WHERE WidgetInstId = 4400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4401) END FROM WidgetInst WHERE WidgetInstId = 4401) = 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 = 'user' AND WidgetInstId = 4395) END FROM WidgetInst WHERE WidgetInstId = 4395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4396) END FROM WidgetInst WHERE WidgetInstId = 4396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4397) END FROM WidgetInst WHERE WidgetInstId = 4397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4398) END FROM WidgetInst WHERE WidgetInstId = 4398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4399) END FROM WidgetInst WHERE WidgetInstId = 4399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4400) END FROM WidgetInst WHERE WidgetInstId = 4400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4401) END FROM WidgetInst WHERE WidgetInstId = 4401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4436;


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 = 3555) END FROM WidgetInst WHERE WidgetInstId = 3555) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4444;


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 = 3556) END FROM WidgetInst WHERE WidgetInstId = 3556) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4445;


