# 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 = 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 = 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 = 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 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 = 437;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 600) END FROM WidgetInst WHERE WidgetInstId = 600)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 612;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 439) END FROM WidgetInst WHERE WidgetInstId = 439) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 603) END FROM WidgetInst WHERE WidgetInstId = 603)) = 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 = 'U.S. Customary' AND WidgetInstId = 608) END FROM WidgetInst WHERE WidgetInstId = 608) = 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 = 'U.S. Customary' AND WidgetInstId = 609) END FROM WidgetInst WHERE WidgetInstId = 609) = 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 = 'U.S. Customary' AND WidgetInstId = 610) END FROM WidgetInst WHERE WidgetInstId = 610) = 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 = 'U.S. Customary' AND WidgetInstId = 611) END FROM WidgetInst WHERE WidgetInstId = 611) = 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 = 'Metric' AND WidgetInstId = 608) END FROM WidgetInst WHERE WidgetInstId = 608) = 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 = 'Metric' AND WidgetInstId = 609) END FROM WidgetInst WHERE WidgetInstId = 609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 629;


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 600) END FROM WidgetInst WHERE WidgetInstId = 600)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 648;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 438) END FROM WidgetInst WHERE WidgetInstId = 438) = 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 = 'Internal sink' AND WidgetInstId = 439) END FROM WidgetInst WHERE WidgetInstId = 439) = 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 = 'Constant' AND WidgetInstId = 1136) END FROM WidgetInst WHERE WidgetInstId = 1136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1140;


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1137) END FROM WidgetInst WHERE WidgetInstId = 1137) = 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 = 'Rating curve' AND WidgetInstId = 1138) END FROM WidgetInst WHERE WidgetInstId = 1138) = 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 = 'Rating curve' AND WidgetInstId = 1139) END FROM WidgetInst WHERE WidgetInstId = 1139) = 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 = 'Link' AND WidgetInstId = 436) END FROM WidgetInst WHERE WidgetInstId = 436) = 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 = 'Link' AND WidgetInstId = 437) END FROM WidgetInst WHERE WidgetInstId = 437) = 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 = 'Link' AND WidgetInstId = 438) END FROM WidgetInst WHERE WidgetInstId = 438) = 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 = 'Link' AND WidgetInstId = 439) END FROM WidgetInst WHERE WidgetInstId = 439) = 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 = 1232) END FROM WidgetInst WHERE WidgetInstId = 1232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1236;


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


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


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


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


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


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


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


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


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


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


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


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 = 1320) END FROM WidgetInst WHERE WidgetInstId = 1320) = 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 = 'Specified' AND WidgetInstId = 1321) END FROM WidgetInst WHERE WidgetInstId = 1321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1325;


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 = 1322) END FROM WidgetInst WHERE WidgetInstId = 1322) = 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 = 'Specified' AND WidgetInstId = 1323) END FROM WidgetInst WHERE WidgetInstId = 1323) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1327;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 1372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 437) END FROM WidgetInst WHERE WidgetInstId = 437) 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 = 1373;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 438) END FROM WidgetInst WHERE WidgetInstId = 438) 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 = 1374;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 439) END FROM WidgetInst WHERE WidgetInstId = 439) 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 = 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 = 'File' AND WidgetInstId = 1380) END FROM WidgetInst WHERE WidgetInstId = 1380) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1384;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 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 = 'Constant' 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 = 'Time Series' AND WidgetInstId = 1414) END FROM WidgetInst WHERE WidgetInstId = 1414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1418;


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1435) END FROM WidgetInst WHERE WidgetInstId = 1435)) = 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 = 'U.S. Customary' AND WidgetInstId = 1437) END FROM WidgetInst WHERE WidgetInstId = 1437) = 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 = 'Metric' AND WidgetInstId = 1437) END FROM WidgetInst WHERE WidgetInstId = 1437) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1442;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1435) END FROM WidgetInst WHERE WidgetInstId = 1435)) = 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 = 'U.S. Customary' AND WidgetInstId = 1437) END FROM WidgetInst WHERE WidgetInstId = 1437) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1450;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 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 = 'Specified' AND WidgetInstId = 1615) END FROM WidgetInst WHERE WidgetInstId = 1615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1616;


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 47) END FROM WidgetInst WHERE WidgetInstId = 47)) = 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 = 'File' AND WidgetInstId = 1630) END FROM WidgetInst WHERE WidgetInstId = 1630) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1631;


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


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


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


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


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


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


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


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


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


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


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 = 1672) END FROM WidgetInst WHERE WidgetInstId = 1672) = 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 = 'Depth Varied' AND WidgetInstId = 1673) END FROM WidgetInst WHERE WidgetInstId = 1673) = 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 = 'Depth Varied' AND WidgetInstId = 1674) END FROM WidgetInst WHERE WidgetInstId = 1674) = 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 = 'Constant' AND WidgetInstId = 1700) END FROM WidgetInst WHERE WidgetInstId = 1700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1701;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 1747) END FROM WidgetInst WHERE WidgetInstId = 1747) = 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 = 'Depth Varied' AND WidgetInstId = 1748) END FROM WidgetInst WHERE WidgetInstId = 1748) = 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 = 'Depth Varied' AND WidgetInstId = 1749) END FROM WidgetInst WHERE WidgetInstId = 1749) = 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 = 'Depth Varied' AND WidgetInstId = 1750) END FROM WidgetInst WHERE WidgetInstId = 1750) = 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 = 'Depth Varied' AND WidgetInstId = 1751) END FROM WidgetInst WHERE WidgetInstId = 1751) = 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 = 'Depth Varied' AND WidgetInstId = 1752) END FROM WidgetInst WHERE WidgetInstId = 1752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1770;


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 1827) END FROM WidgetInst WHERE WidgetInstId = 1827) = 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 = 'Initial Water Surface Elevation' AND WidgetInstId = 1827) END FROM WidgetInst WHERE WidgetInstId = 1827) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1830;


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 1869) END FROM WidgetInst WHERE WidgetInstId = 1869) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1872;


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


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 Frequency' AND WidgetInstId = 1886) END FROM WidgetInst WHERE WidgetInstId = 1886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1887;


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 Times' AND WidgetInstId = 1886) END FROM WidgetInst WHERE WidgetInstId = 1886) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1889;


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 1908) END FROM WidgetInst WHERE WidgetInstId = 1908) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1911;


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


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 Times' AND WidgetInstId = 1925) END FROM WidgetInst WHERE WidgetInstId = 1925) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 1947) END FROM WidgetInst WHERE WidgetInstId = 1947) = 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 = 'Initial Water Surface Elevation' AND WidgetInstId = 1947) END FROM WidgetInst WHERE WidgetInstId = 1947) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1950;


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 1986) END FROM WidgetInst WHERE WidgetInstId = 1986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 1994) END FROM WidgetInst WHERE WidgetInstId = 1994) = 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 = 'Specified Frequency' AND WidgetInstId = 2003) END FROM WidgetInst WHERE WidgetInstId = 2003) = 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 = 'Specified Times' AND WidgetInstId = 2003) END FROM WidgetInst WHERE WidgetInstId = 2003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2006;


# QueryDef

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


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


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 ('Mainland','Island','Levee outflow','River inflow') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


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


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


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: cold start' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('Linear bottom friction','Quadratic bottom friction','Hybrid nonlinear bottom friction') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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 ('Quadratic bottom friction','Hybrid nonlinear bottom friction') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Quadratic friction nodal attribute - Fric' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mannings N nodal attribute - ManningsN' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Chezy C nodal attribute - ChezyFric' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM OrOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('No wetting/drying','With wetting/drying') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pure primitive equation: TAU0 specified' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spatially discrete/time constant: TAU0 = -1' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spatially variable/time constant: TAU0 = -2' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('Barotropic 2DDI using lumped GWCE (explicit)','Barotropic 3D using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('Barotropic 2DDI using lumped GWCE (explicit)','Barotropic 3D using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('1','2','3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('2','3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NetCDF','NetCDF4') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   12 - Velocity/Pressure OWI files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   12 - Velocity/Pressure OWI files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('NWS =    2 - Stress/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format','NWS =    5 - Velocity/Pressure - every node/time interval','NWS =   12 - Velocity/Pressure OWI files','NWS =   15 - HWind files','NWS =   16 - GFDL files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    5 - Velocity/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format','NWS =    5 - Velocity/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    8 - Symmetric cyclonic storm from path','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   19 - Asymmetric cyclonic storm from path','NWS =   20 - GAHM Format cyclonic storm path') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   12 - Velocity/Pressure OWI files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   12 - Velocity/Pressure OWI files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 ('NWS =   15 - HWind files','NWS =   16 - GFDL files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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 central pressure' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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 ('NWS =    3 - Velocity in US Navy Fleet Numeric format','NWS =    6 - Velocity/Pressure on grid') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =    3 - Velocity in US Navy Fleet Numeric format' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =    6 - Velocity/Pressure on grid' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('NWS =    8 - Symmetric cyclonic storm from path','NWS =   19 - Asymmetric cyclonic storm from path','NWS =   20 - GAHM Format cyclonic storm path') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   20 - GAHM Format cyclonic storm path' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


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


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


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


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


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


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 = 7 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('Barotropic 2DDI','Barotropic 2DDI using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 29 AND WidgetInstId = ?;


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 139 AND WidgetInstId = ?;


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


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 159 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 161 AND WidgetInstId = ?;


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


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


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


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 199 AND WidgetInstId = ?;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Full plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Source terms and propagation' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant value' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 463 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 464 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 466 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 467 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 469 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 470 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 472 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 473 AND WidgetInstId = ?;


