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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 195) END FROM WidgetInst WHERE WidgetInstId = 195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 196;


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


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 = 195) END FROM WidgetInst WHERE WidgetInstId = 195) = 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 = 50) END FROM WidgetInst WHERE WidgetInstId = 50) = 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 = '(none selected)' AND WidgetInstId = 50) END FROM WidgetInst WHERE WidgetInstId = 50) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 195) END FROM WidgetInst WHERE WidgetInstId = 195) = 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 = 'Constant' AND WidgetInstId = 215) END FROM WidgetInst WHERE WidgetInstId = 215) = 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 = 'Time Series' AND WidgetInstId = 215) END FROM WidgetInst WHERE WidgetInstId = 215) = 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 195) END FROM WidgetInst WHERE WidgetInstId = 195) = 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 = 'Constant' AND WidgetInstId = 224) END FROM WidgetInst WHERE WidgetInstId = 224) = 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 = 'Time Series' AND WidgetInstId = 224) END FROM WidgetInst WHERE WidgetInstId = 224) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 228;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 446) END FROM WidgetInst WHERE WidgetInstId = 446) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 447) END FROM WidgetInst WHERE WidgetInstId = 447) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 448) END FROM WidgetInst WHERE WidgetInstId = 448) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 449) END FROM WidgetInst WHERE WidgetInstId = 449) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 450) END FROM WidgetInst WHERE WidgetInstId = 450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 456;


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


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


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


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


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


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


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


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


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


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 = 448) END FROM WidgetInst WHERE WidgetInstId = 448) = 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 = 'Culvert HY-8' AND WidgetInstId = 449) END FROM WidgetInst WHERE WidgetInstId = 449) = 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 = 'Culvert HY-8' AND WidgetInstId = 450) END FROM WidgetInst WHERE WidgetInstId = 450) = 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 = 'Culvert HY-8' AND WidgetInstId = 451) END FROM WidgetInst WHERE WidgetInstId = 451) = 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 = 50) END FROM WidgetInst WHERE WidgetInstId = 50) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 518;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 620) END FROM WidgetInst WHERE WidgetInstId = 620) = 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 = 'Constant' AND WidgetInstId = 621) END FROM WidgetInst WHERE WidgetInstId = 621) = 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 = 'Constant' AND WidgetInstId = 622) END FROM WidgetInst WHERE WidgetInstId = 622) = 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 = 'Constant' AND WidgetInstId = 623) END FROM WidgetInst WHERE WidgetInstId = 623) = 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 = 'Constant' AND WidgetInstId = 624) END FROM WidgetInst WHERE WidgetInstId = 624) = 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 = 'Constant' AND WidgetInstId = 625) END FROM WidgetInst WHERE WidgetInstId = 625) = 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 = 'Time Series' AND WidgetInstId = 620) END FROM WidgetInst WHERE WidgetInstId = 620) = 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 = 'Time Series' AND WidgetInstId = 621) END FROM WidgetInst WHERE WidgetInstId = 621) = 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 = 'Time Series' AND WidgetInstId = 622) END FROM WidgetInst WHERE WidgetInstId = 622) = 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 = 'Time Series' AND WidgetInstId = 623) END FROM WidgetInst WHERE WidgetInstId = 623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 647;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 620) END FROM WidgetInst WHERE WidgetInstId = 620) = 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 = 'Rating Curve' AND WidgetInstId = 621) END FROM WidgetInst WHERE WidgetInstId = 621) = 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 = 'Rating Curve' AND WidgetInstId = 622) END FROM WidgetInst WHERE WidgetInstId = 622) = 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 = 'Rating Curve' AND WidgetInstId = 623) END FROM WidgetInst WHERE WidgetInstId = 623) = 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 = 'Rating Curve' AND WidgetInstId = 624) END FROM WidgetInst WHERE WidgetInstId = 624) = 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 = 'Rating Curve' AND WidgetInstId = 625) END FROM WidgetInst WHERE WidgetInstId = 625) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 446) END FROM WidgetInst WHERE WidgetInstId = 446) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 680;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 446) END FROM WidgetInst WHERE WidgetInstId = 446) = 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 = 'Gate' AND WidgetInstId = 447) END FROM WidgetInst WHERE WidgetInstId = 447) = 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 = 'Gate' AND WidgetInstId = 448) END FROM WidgetInst WHERE WidgetInstId = 448) = 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 = 'Gate' AND WidgetInstId = 449) END FROM WidgetInst WHERE WidgetInstId = 449) = 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 = 'Gate' AND WidgetInstId = 450) END FROM WidgetInst WHERE WidgetInstId = 450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1212;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 450) END FROM WidgetInst WHERE WidgetInstId = 450) = 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 = 'Pressure' AND WidgetInstId = 451) END FROM WidgetInst WHERE WidgetInstId = 451) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 1406) END FROM WidgetInst WHERE WidgetInstId = 1406) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 1407) END FROM WidgetInst WHERE WidgetInstId = 1407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1413;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1773) END FROM WidgetInst WHERE WidgetInstId = 1773) = 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 = 'Computed' AND WidgetInstId = 1774) END FROM WidgetInst WHERE WidgetInstId = 1774) = 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 = 'Computed' AND WidgetInstId = 1775) END FROM WidgetInst WHERE WidgetInstId = 1775) = 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 = 'Computed' AND WidgetInstId = 1776) END FROM WidgetInst WHERE WidgetInstId = 1776) = 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 = 'Computed' AND WidgetInstId = 1777) END FROM WidgetInst WHERE WidgetInstId = 1777) = 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 = 'Computed' AND WidgetInstId = 1772) END FROM WidgetInst WHERE WidgetInstId = 1772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1814;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3069) END FROM WidgetInst WHERE WidgetInstId = 3069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3070) END FROM WidgetInst WHERE WidgetInstId = 3070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3065) END FROM WidgetInst WHERE WidgetInstId = 3065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3066) END FROM WidgetInst WHERE WidgetInstId = 3066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3067) END FROM WidgetInst WHERE WidgetInstId = 3067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3068) END FROM WidgetInst WHERE WidgetInstId = 3068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3069) END FROM WidgetInst WHERE WidgetInstId = 3069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3070) END FROM WidgetInst WHERE WidgetInstId = 3070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3161) END FROM WidgetInst WHERE WidgetInstId = 3161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3163) END FROM WidgetInst WHERE WidgetInstId = 3163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3164) END FROM WidgetInst WHERE WidgetInstId = 3164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3165) END FROM WidgetInst WHERE WidgetInstId = 3165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3166) END FROM WidgetInst WHERE WidgetInstId = 3166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3065) END FROM WidgetInst WHERE WidgetInstId = 3065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3066) END FROM WidgetInst WHERE WidgetInstId = 3066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3067) END FROM WidgetInst WHERE WidgetInstId = 3067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3068) END FROM WidgetInst WHERE WidgetInstId = 3068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3069) END FROM WidgetInst WHERE WidgetInstId = 3069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3070) END FROM WidgetInst WHERE WidgetInstId = 3070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3065) END FROM WidgetInst WHERE WidgetInstId = 3065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3066) END FROM WidgetInst WHERE WidgetInstId = 3066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3067) END FROM WidgetInst WHERE WidgetInstId = 3067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3068) END FROM WidgetInst WHERE WidgetInstId = 3068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3069) END FROM WidgetInst WHERE WidgetInstId = 3069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3070) END FROM WidgetInst WHERE WidgetInstId = 3070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3190;


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 = 3161) END FROM WidgetInst WHERE WidgetInstId = 3161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3162) END FROM WidgetInst WHERE WidgetInstId = 3162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3192;


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 = 3163) END FROM WidgetInst WHERE WidgetInstId = 3163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3164) END FROM WidgetInst WHERE WidgetInstId = 3164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3165) END FROM WidgetInst WHERE WidgetInstId = 3165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3166) END FROM WidgetInst WHERE WidgetInstId = 3166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3065) END FROM WidgetInst WHERE WidgetInstId = 3065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3066) END FROM WidgetInst WHERE WidgetInstId = 3066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3067) END FROM WidgetInst WHERE WidgetInstId = 3067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3068) END FROM WidgetInst WHERE WidgetInstId = 3068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3069) END FROM WidgetInst WHERE WidgetInstId = 3069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3070) END FROM WidgetInst WHERE WidgetInstId = 3070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3065) END FROM WidgetInst WHERE WidgetInstId = 3065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3209;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3066) END FROM WidgetInst WHERE WidgetInstId = 3066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3067) END FROM WidgetInst WHERE WidgetInstId = 3067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3211;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3068) END FROM WidgetInst WHERE WidgetInstId = 3068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3069) END FROM WidgetInst WHERE WidgetInstId = 3069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3070) END FROM WidgetInst WHERE WidgetInstId = 3070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3214;


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 = 2807) END FROM WidgetInst WHERE WidgetInstId = 2807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2808) END FROM WidgetInst WHERE WidgetInstId = 2808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2809) END FROM WidgetInst WHERE WidgetInstId = 2809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2810) END FROM WidgetInst WHERE WidgetInstId = 2810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3218;


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 = 2811) END FROM WidgetInst WHERE WidgetInstId = 2811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2812) END FROM WidgetInst WHERE WidgetInstId = 2812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3220;


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 = 2807) END FROM WidgetInst WHERE WidgetInstId = 2807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2808) END FROM WidgetInst WHERE WidgetInstId = 2808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3234;


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 = 2809) END FROM WidgetInst WHERE WidgetInstId = 2809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2810) END FROM WidgetInst WHERE WidgetInstId = 2810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2811) END FROM WidgetInst WHERE WidgetInstId = 2811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2812) END FROM WidgetInst WHERE WidgetInstId = 2812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3431) END FROM WidgetInst WHERE WidgetInstId = 3431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3432) END FROM WidgetInst WHERE WidgetInstId = 3432) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3433) END FROM WidgetInst WHERE WidgetInstId = 3433) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3434) END FROM WidgetInst WHERE WidgetInstId = 3434) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3435) END FROM WidgetInst WHERE WidgetInstId = 3435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3436) END FROM WidgetInst WHERE WidgetInstId = 3436) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3431) END FROM WidgetInst WHERE WidgetInstId = 3431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3432) END FROM WidgetInst WHERE WidgetInstId = 3432) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3433) END FROM WidgetInst WHERE WidgetInstId = 3433) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3434) END FROM WidgetInst WHERE WidgetInstId = 3434) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3435) END FROM WidgetInst WHERE WidgetInstId = 3435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3436) END FROM WidgetInst WHERE WidgetInstId = 3436) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3431) END FROM WidgetInst WHERE WidgetInstId = 3431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3432) END FROM WidgetInst WHERE WidgetInstId = 3432) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3433) END FROM WidgetInst WHERE WidgetInstId = 3433) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3434) END FROM WidgetInst WHERE WidgetInstId = 3434) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3435) END FROM WidgetInst WHERE WidgetInstId = 3435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3436) END FROM WidgetInst WHERE WidgetInstId = 3436) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2807) END FROM WidgetInst WHERE WidgetInstId = 2807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2808) END FROM WidgetInst WHERE WidgetInstId = 2808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2809) END FROM WidgetInst WHERE WidgetInstId = 2809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2810) END FROM WidgetInst WHERE WidgetInstId = 2810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3476;


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 = 2811) END FROM WidgetInst WHERE WidgetInstId = 2811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2812) END FROM WidgetInst WHERE WidgetInstId = 2812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3527) END FROM WidgetInst WHERE WidgetInstId = 3527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3528) END FROM WidgetInst WHERE WidgetInstId = 3528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3529) END FROM WidgetInst WHERE WidgetInstId = 3529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3530) END FROM WidgetInst WHERE WidgetInstId = 3530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3531) END FROM WidgetInst WHERE WidgetInstId = 3531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3532) END FROM WidgetInst WHERE WidgetInstId = 3532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3527) END FROM WidgetInst WHERE WidgetInstId = 3527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3528) END FROM WidgetInst WHERE WidgetInstId = 3528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3529) END FROM WidgetInst WHERE WidgetInstId = 3529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3530) END FROM WidgetInst WHERE WidgetInstId = 3530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3531) END FROM WidgetInst WHERE WidgetInstId = 3531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3532) END FROM WidgetInst WHERE WidgetInstId = 3532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3527) END FROM WidgetInst WHERE WidgetInstId = 3527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3528) END FROM WidgetInst WHERE WidgetInstId = 3528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3529) END FROM WidgetInst WHERE WidgetInstId = 3529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3530) END FROM WidgetInst WHERE WidgetInstId = 3530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3531) END FROM WidgetInst WHERE WidgetInstId = 3531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3532) END FROM WidgetInst WHERE WidgetInstId = 3532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2807) END FROM WidgetInst WHERE WidgetInstId = 2807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3569;


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 = 2808) END FROM WidgetInst WHERE WidgetInstId = 2808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2809) END FROM WidgetInst WHERE WidgetInstId = 2809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3571;


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 = 2810) END FROM WidgetInst WHERE WidgetInstId = 2810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2811) END FROM WidgetInst WHERE WidgetInstId = 2811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2812) END FROM WidgetInst WHERE WidgetInstId = 2812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3647) END FROM WidgetInst WHERE WidgetInstId = 3647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3648) END FROM WidgetInst WHERE WidgetInstId = 3648) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3649) END FROM WidgetInst WHERE WidgetInstId = 3649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3655;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3650) END FROM WidgetInst WHERE WidgetInstId = 3650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3651) END FROM WidgetInst WHERE WidgetInstId = 3651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3652) END FROM WidgetInst WHERE WidgetInstId = 3652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3647) END FROM WidgetInst WHERE WidgetInstId = 3647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3648) END FROM WidgetInst WHERE WidgetInstId = 3648) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3649) END FROM WidgetInst WHERE WidgetInstId = 3649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3650) END FROM WidgetInst WHERE WidgetInstId = 3650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3651) END FROM WidgetInst WHERE WidgetInstId = 3651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3652) END FROM WidgetInst WHERE WidgetInstId = 3652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3647) END FROM WidgetInst WHERE WidgetInstId = 3647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3648) END FROM WidgetInst WHERE WidgetInstId = 3648) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3649) END FROM WidgetInst WHERE WidgetInstId = 3649) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3650) END FROM WidgetInst WHERE WidgetInstId = 3650) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3651) END FROM WidgetInst WHERE WidgetInstId = 3651) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3652) END FROM WidgetInst WHERE WidgetInstId = 3652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2807) END FROM WidgetInst WHERE WidgetInstId = 2807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3689;


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 = 2808) END FROM WidgetInst WHERE WidgetInstId = 2808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3690;


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 = 2809) END FROM WidgetInst WHERE WidgetInstId = 2809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3691;


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 = 2810) END FROM WidgetInst WHERE WidgetInstId = 2810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3692;


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 = 2811) END FROM WidgetInst WHERE WidgetInstId = 2811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3693;


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 = 2812) END FROM WidgetInst WHERE WidgetInstId = 2812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3694;


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 = 3767) END FROM WidgetInst WHERE WidgetInstId = 3767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3773;


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 = 3768) END FROM WidgetInst WHERE WidgetInstId = 3768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3774;


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 = 3769) END FROM WidgetInst WHERE WidgetInstId = 3769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3775;


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 = 3770) END FROM WidgetInst WHERE WidgetInstId = 3770) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3776;


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 = 3771) END FROM WidgetInst WHERE WidgetInstId = 3771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3777;


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 = 3772) END FROM WidgetInst WHERE WidgetInstId = 3772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3767) END FROM WidgetInst WHERE WidgetInstId = 3767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3785;


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 = 3768) END FROM WidgetInst WHERE WidgetInstId = 3768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3769) END FROM WidgetInst WHERE WidgetInstId = 3769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3770) END FROM WidgetInst WHERE WidgetInstId = 3770) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3771) END FROM WidgetInst WHERE WidgetInstId = 3771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3772) END FROM WidgetInst WHERE WidgetInstId = 3772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3767) END FROM WidgetInst WHERE WidgetInstId = 3767) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3797;


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 = 3768) END FROM WidgetInst WHERE WidgetInstId = 3768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3798;


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 = 3769) END FROM WidgetInst WHERE WidgetInstId = 3769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3799;


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 = 3770) END FROM WidgetInst WHERE WidgetInstId = 3770) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3800;


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 = 3771) END FROM WidgetInst WHERE WidgetInstId = 3771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3801;


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 = 3772) END FROM WidgetInst WHERE WidgetInstId = 3772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3802;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3803) END FROM WidgetInst WHERE WidgetInstId = 3803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3767) END FROM WidgetInst WHERE WidgetInstId = 3767)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3809;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3804) END FROM WidgetInst WHERE WidgetInstId = 3804) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3768) END FROM WidgetInst WHERE WidgetInstId = 3768)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3810;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3805) END FROM WidgetInst WHERE WidgetInstId = 3805) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3769) END FROM WidgetInst WHERE WidgetInstId = 3769)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3811;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3806) END FROM WidgetInst WHERE WidgetInstId = 3806) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3770) END FROM WidgetInst WHERE WidgetInstId = 3770)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3812;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3807) END FROM WidgetInst WHERE WidgetInstId = 3807) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3771) END FROM WidgetInst WHERE WidgetInstId = 3771)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3813;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3808) END FROM WidgetInst WHERE WidgetInstId = 3808) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3772) END FROM WidgetInst WHERE WidgetInstId = 3772)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3814;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3803) END FROM WidgetInst WHERE WidgetInstId = 3803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3767) END FROM WidgetInst WHERE WidgetInstId = 3767)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3821;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3804) END FROM WidgetInst WHERE WidgetInstId = 3804) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3768) END FROM WidgetInst WHERE WidgetInstId = 3768)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3822;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3805) END FROM WidgetInst WHERE WidgetInstId = 3805) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3769) END FROM WidgetInst WHERE WidgetInstId = 3769)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3823;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3806) END FROM WidgetInst WHERE WidgetInstId = 3806) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3770) END FROM WidgetInst WHERE WidgetInstId = 3770)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3824;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3807) END FROM WidgetInst WHERE WidgetInstId = 3807) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3771) END FROM WidgetInst WHERE WidgetInstId = 3771)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3825;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3808) END FROM WidgetInst WHERE WidgetInstId = 3808) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3772) END FROM WidgetInst WHERE WidgetInstId = 3772)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3826;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3803) END FROM WidgetInst WHERE WidgetInstId = 3803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3767) END FROM WidgetInst WHERE WidgetInstId = 3767)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3833;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3804) END FROM WidgetInst WHERE WidgetInstId = 3804) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3768) END FROM WidgetInst WHERE WidgetInstId = 3768)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3805) END FROM WidgetInst WHERE WidgetInstId = 3805) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3769) END FROM WidgetInst WHERE WidgetInstId = 3769)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3835;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3806) END FROM WidgetInst WHERE WidgetInstId = 3806) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3770) END FROM WidgetInst WHERE WidgetInstId = 3770)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3836;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3807) END FROM WidgetInst WHERE WidgetInstId = 3807) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3771) END FROM WidgetInst WHERE WidgetInstId = 3771)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3837;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3808) END FROM WidgetInst WHERE WidgetInstId = 3808) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3772) END FROM WidgetInst WHERE WidgetInstId = 3772)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2807) END FROM WidgetInst WHERE WidgetInstId = 2807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3845;


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 = 2808) END FROM WidgetInst WHERE WidgetInstId = 2808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2809) END FROM WidgetInst WHERE WidgetInstId = 2809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2810) END FROM WidgetInst WHERE WidgetInstId = 2810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3848;


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 = 2811) END FROM WidgetInst WHERE WidgetInstId = 2811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3849;


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 = 2812) END FROM WidgetInst WHERE WidgetInstId = 2812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3899;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3901;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3902;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3903;


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 = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3857) END FROM WidgetInst WHERE WidgetInstId = 3857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3965;


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 = 3858) END FROM WidgetInst WHERE WidgetInstId = 3858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3859) END FROM WidgetInst WHERE WidgetInstId = 3859) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3967;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3860) END FROM WidgetInst WHERE WidgetInstId = 3860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3968;


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 = 3861) END FROM WidgetInst WHERE WidgetInstId = 3861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3969;


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 = 3862) END FROM WidgetInst WHERE WidgetInstId = 3862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3970;


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 = 2807) END FROM WidgetInst WHERE WidgetInstId = 2807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3983;


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 = 2808) END FROM WidgetInst WHERE WidgetInstId = 2808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3984;


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 = 2809) END FROM WidgetInst WHERE WidgetInstId = 2809) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3985;


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 = 2810) END FROM WidgetInst WHERE WidgetInstId = 2810) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3986;


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 = 2811) END FROM WidgetInst WHERE WidgetInstId = 2811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3987;


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 = 2812) END FROM WidgetInst WHERE WidgetInstId = 2812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4001) END FROM WidgetInst WHERE WidgetInstId = 4001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4002) END FROM WidgetInst WHERE WidgetInstId = 4002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4003) END FROM WidgetInst WHERE WidgetInstId = 4003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4004) END FROM WidgetInst WHERE WidgetInstId = 4004) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4010;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4005) END FROM WidgetInst WHERE WidgetInstId = 4005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4006) END FROM WidgetInst WHERE WidgetInstId = 4006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4001) END FROM WidgetInst WHERE WidgetInstId = 4001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4002) END FROM WidgetInst WHERE WidgetInstId = 4002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4003) END FROM WidgetInst WHERE WidgetInstId = 4003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4004) END FROM WidgetInst WHERE WidgetInstId = 4004) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4005) END FROM WidgetInst WHERE WidgetInstId = 4005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4006) END FROM WidgetInst WHERE WidgetInstId = 4006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4001) END FROM WidgetInst WHERE WidgetInstId = 4001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4043;


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 = 4002) END FROM WidgetInst WHERE WidgetInstId = 4002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4044;


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 = 4003) END FROM WidgetInst WHERE WidgetInstId = 4003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4045;


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 = 4004) END FROM WidgetInst WHERE WidgetInstId = 4004) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4046;


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 = 4005) END FROM WidgetInst WHERE WidgetInstId = 4005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4047;


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 = 4006) END FROM WidgetInst WHERE WidgetInstId = 4006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4048;


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 = 4001) END FROM WidgetInst WHERE WidgetInstId = 4001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4109;


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 = 4002) END FROM WidgetInst WHERE WidgetInstId = 4002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4003) END FROM WidgetInst WHERE WidgetInstId = 4003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4111;


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 = 4004) END FROM WidgetInst WHERE WidgetInstId = 4004) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4112;


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 = 4005) END FROM WidgetInst WHERE WidgetInstId = 4005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4113;


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 = 4006) END FROM WidgetInst WHERE WidgetInstId = 4006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4133) END FROM WidgetInst WHERE WidgetInstId = 4133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 4134) END FROM WidgetInst WHERE WidgetInstId = 4134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4140;


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 = 4135) END FROM WidgetInst WHERE WidgetInstId = 4135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4141;


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 = 4136) END FROM WidgetInst WHERE WidgetInstId = 4136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4142;


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 = 4137) END FROM WidgetInst WHERE WidgetInstId = 4137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4143;


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 = 4138) END FROM WidgetInst WHERE WidgetInstId = 4138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4133) END FROM WidgetInst WHERE WidgetInstId = 4133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4151;


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 = 4134) END FROM WidgetInst WHERE WidgetInstId = 4134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4152;


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 = 4135) END FROM WidgetInst WHERE WidgetInstId = 4135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4153;


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 = 4136) END FROM WidgetInst WHERE WidgetInstId = 4136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4154;


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 = 4137) END FROM WidgetInst WHERE WidgetInstId = 4137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4155;


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 = 4138) END FROM WidgetInst WHERE WidgetInstId = 4138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4156;


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 = 4133) END FROM WidgetInst WHERE WidgetInstId = 4133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4163;


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 = 4134) END FROM WidgetInst WHERE WidgetInstId = 4134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4164;


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 = 4135) END FROM WidgetInst WHERE WidgetInstId = 4135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4165;


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 = 4136) END FROM WidgetInst WHERE WidgetInstId = 4136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4137) END FROM WidgetInst WHERE WidgetInstId = 4137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4138) END FROM WidgetInst WHERE WidgetInstId = 4138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4168;


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 = 4133) END FROM WidgetInst WHERE WidgetInstId = 4133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4175;


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 = 4134) END FROM WidgetInst WHERE WidgetInstId = 4134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4176;


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 = 4135) END FROM WidgetInst WHERE WidgetInstId = 4135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4177;


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 = 4136) END FROM WidgetInst WHERE WidgetInstId = 4136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4137) END FROM WidgetInst WHERE WidgetInstId = 4137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4138) END FROM WidgetInst WHERE WidgetInstId = 4138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4133) END FROM WidgetInst WHERE WidgetInstId = 4133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4134) END FROM WidgetInst WHERE WidgetInstId = 4134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4188;


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 = 4135) END FROM WidgetInst WHERE WidgetInstId = 4135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4189;


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 = 4136) END FROM WidgetInst WHERE WidgetInstId = 4136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4190;


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 = 4137) END FROM WidgetInst WHERE WidgetInstId = 4137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4191;


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 = 4138) END FROM WidgetInst WHERE WidgetInstId = 4138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4133) END FROM WidgetInst WHERE WidgetInstId = 4133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4199;


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 = 4134) END FROM WidgetInst WHERE WidgetInstId = 4134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4200;


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 = 4135) END FROM WidgetInst WHERE WidgetInstId = 4135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4201;


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 = 4136) END FROM WidgetInst WHERE WidgetInstId = 4136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4137) END FROM WidgetInst WHERE WidgetInstId = 4137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 4138) END FROM WidgetInst WHERE WidgetInstId = 4138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4204;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 2807) END FROM WidgetInst WHERE WidgetInstId = 2807) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2414) END FROM WidgetInst WHERE WidgetInstId = 2414)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4211;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 2808) END FROM WidgetInst WHERE WidgetInstId = 2808) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2414) END FROM WidgetInst WHERE WidgetInstId = 2414)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4212;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 2809) END FROM WidgetInst WHERE WidgetInstId = 2809) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2414) END FROM WidgetInst WHERE WidgetInstId = 2414)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4213;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 2810) END FROM WidgetInst WHERE WidgetInstId = 2810) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2414) END FROM WidgetInst WHERE WidgetInstId = 2414)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4214;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 2811) END FROM WidgetInst WHERE WidgetInstId = 2811) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2414) END FROM WidgetInst WHERE WidgetInstId = 2414)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4215;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 2812) END FROM WidgetInst WHERE WidgetInstId = 2812) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2414) END FROM WidgetInst WHERE WidgetInstId = 2414)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4216;


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 = 4223) END FROM WidgetInst WHERE WidgetInstId = 4223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4224) END FROM WidgetInst WHERE WidgetInstId = 4224) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4230;


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 = 4225) END FROM WidgetInst WHERE WidgetInstId = 4225) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4231;


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 = 4226) END FROM WidgetInst WHERE WidgetInstId = 4226) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4227) END FROM WidgetInst WHERE WidgetInstId = 4227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 4228) END FROM WidgetInst WHERE WidgetInstId = 4228) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4234;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4245;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4245;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4245;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4245;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4245;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4245;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4246;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4246;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4246;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4246;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4246;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 4246;


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 = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4247;


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 = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4248;


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 = 4251) END FROM WidgetInst WHERE WidgetInstId = 4251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4253;


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 = 4252) END FROM WidgetInst WHERE WidgetInstId = 4252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4257;


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 = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4269;


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 = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4270;


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 = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2411) END FROM WidgetInst WHERE WidgetInstId = 2411) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4276;


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 = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4285) END FROM WidgetInst WHERE WidgetInstId = 4285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4286) END FROM WidgetInst WHERE WidgetInstId = 4286) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4288;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4285) END FROM WidgetInst WHERE WidgetInstId = 4285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4286) END FROM WidgetInst WHERE WidgetInstId = 4286) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4299;


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 = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4300;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4303) END FROM WidgetInst WHERE WidgetInstId = 4303) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4304) END FROM WidgetInst WHERE WidgetInstId = 4304) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4306;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4303) END FROM WidgetInst WHERE WidgetInstId = 4303) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4304) END FROM WidgetInst WHERE WidgetInstId = 4304) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4303) END FROM WidgetInst WHERE WidgetInstId = 4303) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4317;


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 = 4304) END FROM WidgetInst WHERE WidgetInstId = 4304) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4324;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4327) END FROM WidgetInst WHERE WidgetInstId = 4327)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4333;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4328) END FROM WidgetInst WHERE WidgetInstId = 4328)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4331) END FROM WidgetInst WHERE WidgetInstId = 4331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4332) END FROM WidgetInst WHERE WidgetInstId = 4332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4331) END FROM WidgetInst WHERE WidgetInstId = 4331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4332) END FROM WidgetInst WHERE WidgetInstId = 4332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4331) END FROM WidgetInst WHERE WidgetInstId = 4331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4332) END FROM WidgetInst WHERE WidgetInstId = 4332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4331) END FROM WidgetInst WHERE WidgetInstId = 4331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4332) END FROM WidgetInst WHERE WidgetInstId = 4332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4350;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4327) END FROM WidgetInst WHERE WidgetInstId = 4327)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4351;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4328) END FROM WidgetInst WHERE WidgetInstId = 4328)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4331) END FROM WidgetInst WHERE WidgetInstId = 4331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4332) END FROM WidgetInst WHERE WidgetInstId = 4332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4331) END FROM WidgetInst WHERE WidgetInstId = 4331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4332) END FROM WidgetInst WHERE WidgetInstId = 4332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4363) END FROM WidgetInst WHERE WidgetInstId = 4363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4364) END FROM WidgetInst WHERE WidgetInstId = 4364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4331) END FROM WidgetInst WHERE WidgetInstId = 4331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4369;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4332) END FROM WidgetInst WHERE WidgetInstId = 4332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4331) END FROM WidgetInst WHERE WidgetInstId = 4331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4332) END FROM WidgetInst WHERE WidgetInstId = 4332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4372;


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 = 4363) END FROM WidgetInst WHERE WidgetInstId = 4363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 4364) END FROM WidgetInst WHERE WidgetInstId = 4364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4331) END FROM WidgetInst WHERE WidgetInstId = 4331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 4332) END FROM WidgetInst WHERE WidgetInstId = 4332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4331) END FROM WidgetInst WHERE WidgetInstId = 4331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 4332) END FROM WidgetInst WHERE WidgetInstId = 4332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4380;


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 = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4382;


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 = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4453) END FROM WidgetInst WHERE WidgetInstId = 4453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4454) END FROM WidgetInst WHERE WidgetInstId = 4454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4453) END FROM WidgetInst WHERE WidgetInstId = 4453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4454) END FROM WidgetInst WHERE WidgetInstId = 4454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4453) END FROM WidgetInst WHERE WidgetInstId = 4453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4454) END FROM WidgetInst WHERE WidgetInstId = 4454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4485) END FROM WidgetInst WHERE WidgetInstId = 4485) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4486) END FROM WidgetInst WHERE WidgetInstId = 4486) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4485) END FROM WidgetInst WHERE WidgetInstId = 4485) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4486) END FROM WidgetInst WHERE WidgetInstId = 4486) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4485) END FROM WidgetInst WHERE WidgetInstId = 4485) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4486) END FROM WidgetInst WHERE WidgetInstId = 4486) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4496;


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 = 4245) END FROM WidgetInst WHERE WidgetInstId = 4245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4499;


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 = 4246) END FROM WidgetInst WHERE WidgetInstId = 4246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4500;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4525) END FROM WidgetInst WHERE WidgetInstId = 4525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4526) END FROM WidgetInst WHERE WidgetInstId = 4526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4525) END FROM WidgetInst WHERE WidgetInstId = 4525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4526) END FROM WidgetInst WHERE WidgetInstId = 4526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4525) END FROM WidgetInst WHERE WidgetInstId = 4525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4535;


