# WidgetDef

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


# QueryInst

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 89) END FROM WidgetInst WHERE WidgetInstId = 89) = 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 = 'Mobile' AND WidgetInstId = 89) END FROM WidgetInst WHERE WidgetInstId = 89) = 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 = 'Mixed' AND WidgetInstId = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 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 = 'Parker' AND WidgetInstId = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 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 = 'Parker' AND WidgetInstId = 102) END FROM WidgetInst WHERE WidgetInstId = 102) = 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 = 'Parker' AND WidgetInstId = 104) END FROM WidgetInst WHERE WidgetInstId = 104) = 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 = 'Parker' AND WidgetInstId = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 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 = 'Parker' AND WidgetInstId = 102) END FROM WidgetInst WHERE WidgetInstId = 102) = 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 = 'Parker' AND WidgetInstId = 104) END FROM WidgetInst WHERE WidgetInstId = 104) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 102) END FROM WidgetInst WHERE WidgetInstId = 102) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 104) END FROM WidgetInst WHERE WidgetInstId = 104) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 102) END FROM WidgetInst WHERE WidgetInstId = 102) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 104) END FROM WidgetInst WHERE WidgetInstId = 104) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 102) END FROM WidgetInst WHERE WidgetInstId = 102) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 104) END FROM WidgetInst WHERE WidgetInstId = 104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 134;


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 104) END FROM WidgetInst WHERE WidgetInstId = 104) = 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 = 'Trinity' AND WidgetInstId = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 148;


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


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


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


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


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


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


Query:
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 = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 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 = 'User defined' AND WidgetInstId = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 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 = 'User defined' AND WidgetInstId = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 168;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 86) END FROM WidgetInst WHERE WidgetInstId = 86) = 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 = '(none selected)' AND WidgetInstId = 86) END FROM WidgetInst WHERE WidgetInstId = 86) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 231) END FROM WidgetInst WHERE WidgetInstId = 231) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 249;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 86) END FROM WidgetInst WHERE WidgetInstId = 86) = 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 = '(none selected)' AND WidgetInstId = 86) END FROM WidgetInst WHERE WidgetInstId = 86) = 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 = '(none selected)' AND WidgetInstId = 86) END FROM WidgetInst WHERE WidgetInstId = 86) = 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 = '(none selected)' AND WidgetInstId = 86) END FROM WidgetInst WHERE WidgetInstId = 86) = 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 = '(none selected)' AND WidgetInstId = 86) END FROM WidgetInst WHERE WidgetInstId = 86) = 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 = '(none selected)' AND WidgetInstId = 86) END FROM WidgetInst WHERE WidgetInstId = 86) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 484) END FROM WidgetInst WHERE WidgetInstId = 484) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 485) END FROM WidgetInst WHERE WidgetInstId = 485) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 486) END FROM WidgetInst WHERE WidgetInstId = 486) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 487) END FROM WidgetInst WHERE WidgetInstId = 487) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 488) END FROM WidgetInst WHERE WidgetInstId = 488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 614;


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET 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 = 653;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 687) END FROM WidgetInst WHERE WidgetInstId = 687) = 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 = 'Rating Curve' AND WidgetInstId = 688) END FROM WidgetInst WHERE WidgetInstId = 688) = 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 = 'Rating Curve' AND WidgetInstId = 689) END FROM WidgetInst WHERE WidgetInstId = 689) = 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 = 'Rating Curve' AND WidgetInstId = 690) END FROM WidgetInst WHERE WidgetInstId = 690) = 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 = 'Rating Curve' AND WidgetInstId = 691) END FROM WidgetInst WHERE WidgetInstId = 691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 740;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 484) END FROM WidgetInst WHERE WidgetInstId = 484) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 485) END FROM WidgetInst WHERE WidgetInstId = 485) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 486) END FROM WidgetInst WHERE WidgetInstId = 486) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 487) END FROM WidgetInst WHERE WidgetInstId = 487) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 488) END FROM WidgetInst WHERE WidgetInstId = 488) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 489) END FROM WidgetInst WHERE WidgetInstId = 489) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 490) END FROM WidgetInst WHERE WidgetInstId = 490) = 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 = 484) END FROM WidgetInst WHERE WidgetInstId = 484) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 771) END FROM WidgetInst WHERE WidgetInstId = 771)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 792;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1470) END FROM WidgetInst WHERE WidgetInstId = 1470) = 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 = 'user' AND WidgetInstId = 1464) END FROM WidgetInst WHERE WidgetInstId = 1464) = 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 = 'user' AND WidgetInstId = 1465) END FROM WidgetInst WHERE WidgetInstId = 1465) = 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 = 'user' AND WidgetInstId = 1466) END FROM WidgetInst WHERE WidgetInstId = 1466) = 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 = 'user' AND WidgetInstId = 1467) END FROM WidgetInst WHERE WidgetInstId = 1467) = 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 = 'user' AND WidgetInstId = 1468) END FROM WidgetInst WHERE WidgetInstId = 1468) = 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 = 'user' AND WidgetInstId = 1469) END FROM WidgetInst WHERE WidgetInstId = 1469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1490;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 2161) END FROM WidgetInst WHERE WidgetInstId = 2161) = 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 = 'Internal sink' AND WidgetInstId = 2162) END FROM WidgetInst WHERE WidgetInstId = 2162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2508;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2892) END FROM WidgetInst WHERE WidgetInstId = 2892) = 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 = 'U.S. Customary' AND WidgetInstId = 2876) END FROM WidgetInst WHERE WidgetInstId = 2876) = 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 = 'Metric' AND WidgetInstId = 2876) END FROM WidgetInst WHERE WidgetInstId = 2876) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2833) END FROM WidgetInst WHERE WidgetInstId = 2833) = 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 = 'Culvert' AND WidgetInstId = 2833) END FROM WidgetInst WHERE WidgetInstId = 2833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2904;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 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 = 'On' AND WidgetInstId = 3107) END FROM WidgetInst WHERE WidgetInstId = 3107) = 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 = 'On' AND WidgetInstId = 3108) END FROM WidgetInst WHERE WidgetInstId = 3108) = 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 = 'On' AND WidgetInstId = 3109) END FROM WidgetInst WHERE WidgetInstId = 3109) = 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 = 'On' AND WidgetInstId = 3110) END FROM WidgetInst WHERE WidgetInstId = 3110) = 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 = 'On' AND WidgetInstId = 3111) END FROM WidgetInst WHERE WidgetInstId = 3111) = 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 = 'On' AND WidgetInstId = 3112) END FROM WidgetInst WHERE WidgetInstId = 3112) = 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 = 'On' AND WidgetInstId = 3113) END FROM WidgetInst WHERE WidgetInstId = 3113) = 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 = 'Culvert HY-8' AND WidgetInstId = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3128;


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) = 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)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) = 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)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) = 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)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) = 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)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 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 = 'Constant' AND WidgetInstId = 3226) END FROM WidgetInst WHERE WidgetInstId = 3226) = 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 = 'Constant' AND WidgetInstId = 3227) END FROM WidgetInst WHERE WidgetInstId = 3227) = 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 = 'Constant' AND WidgetInstId = 3228) END FROM WidgetInst WHERE WidgetInstId = 3228) = 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 = 'Constant' AND WidgetInstId = 3229) END FROM WidgetInst WHERE WidgetInstId = 3229) = 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 = 'Constant' AND WidgetInstId = 3230) END FROM WidgetInst WHERE WidgetInstId = 3230) = 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 = 'Constant' AND WidgetInstId = 3231) END FROM WidgetInst WHERE WidgetInstId = 3231) = 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 = 'Constant' AND WidgetInstId = 3232) END FROM WidgetInst WHERE WidgetInstId = 3232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3239;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3363;


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 = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3365;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3373) END FROM WidgetInst WHERE WidgetInstId = 3373)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3394;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3374) END FROM WidgetInst WHERE WidgetInstId = 3374)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3395;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3375) END FROM WidgetInst WHERE WidgetInstId = 3375)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3396;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3376) END FROM WidgetInst WHERE WidgetInstId = 3376)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3397;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3377) END FROM WidgetInst WHERE WidgetInstId = 3377)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3398;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3378) END FROM WidgetInst WHERE WidgetInstId = 3378)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3399;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3379) END FROM WidgetInst WHERE WidgetInstId = 3379)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3387) END FROM WidgetInst WHERE WidgetInstId = 3387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3388) END FROM WidgetInst WHERE WidgetInstId = 3388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3389) END FROM WidgetInst WHERE WidgetInstId = 3389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3390) END FROM WidgetInst WHERE WidgetInstId = 3390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3391) END FROM WidgetInst WHERE WidgetInstId = 3391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3393) END FROM WidgetInst WHERE WidgetInstId = 3393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3387) END FROM WidgetInst WHERE WidgetInstId = 3387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3388) END FROM WidgetInst WHERE WidgetInstId = 3388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3389) END FROM WidgetInst WHERE WidgetInstId = 3389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3390) END FROM WidgetInst WHERE WidgetInstId = 3390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3391) END FROM WidgetInst WHERE WidgetInstId = 3391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3393) END FROM WidgetInst WHERE WidgetInstId = 3393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3387) END FROM WidgetInst WHERE WidgetInstId = 3387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3388) END FROM WidgetInst WHERE WidgetInstId = 3388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3389) END FROM WidgetInst WHERE WidgetInstId = 3389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3390) END FROM WidgetInst WHERE WidgetInstId = 3390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3391) END FROM WidgetInst WHERE WidgetInstId = 3391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3393) END FROM WidgetInst WHERE WidgetInstId = 3393) = 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 = 'Metric' AND WidgetInstId = 3387) END FROM WidgetInst WHERE WidgetInstId = 3387) = 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 = 'Metric' AND WidgetInstId = 3388) END FROM WidgetInst WHERE WidgetInstId = 3388) = 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 = 'Metric' AND WidgetInstId = 3389) END FROM WidgetInst WHERE WidgetInstId = 3389) = 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 = 'Metric' AND WidgetInstId = 3390) END FROM WidgetInst WHERE WidgetInstId = 3390) = 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 = 'Metric' AND WidgetInstId = 3391) END FROM WidgetInst WHERE WidgetInstId = 3391) = 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 = 'Metric' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3393) END FROM WidgetInst WHERE WidgetInstId = 3393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3456;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3373) END FROM WidgetInst WHERE WidgetInstId = 3373)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3457;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3374) END FROM WidgetInst WHERE WidgetInstId = 3374)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3458;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3375) END FROM WidgetInst WHERE WidgetInstId = 3375)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3459;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3376) END FROM WidgetInst WHERE WidgetInstId = 3376)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3460;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3377) END FROM WidgetInst WHERE WidgetInstId = 3377)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3461;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3378) END FROM WidgetInst WHERE WidgetInstId = 3378)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3462;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3379) END FROM WidgetInst WHERE WidgetInstId = 3379)) = 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 = 'U.S. Customary' AND WidgetInstId = 3387) END FROM WidgetInst WHERE WidgetInstId = 3387) = 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 = 'U.S. Customary' AND WidgetInstId = 3388) END FROM WidgetInst WHERE WidgetInstId = 3388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3479;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3389) END FROM WidgetInst WHERE WidgetInstId = 3389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3390) END FROM WidgetInst WHERE WidgetInstId = 3390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3391) END FROM WidgetInst WHERE WidgetInstId = 3391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3393) END FROM WidgetInst WHERE WidgetInstId = 3393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3387) END FROM WidgetInst WHERE WidgetInstId = 3387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3388) END FROM WidgetInst WHERE WidgetInstId = 3388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3389) END FROM WidgetInst WHERE WidgetInstId = 3389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3390) END FROM WidgetInst WHERE WidgetInstId = 3390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3391) END FROM WidgetInst WHERE WidgetInstId = 3391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3393) END FROM WidgetInst WHERE WidgetInstId = 3393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3499) END FROM WidgetInst WHERE WidgetInstId = 3499) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3500) END FROM WidgetInst WHERE WidgetInstId = 3500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3501) END FROM WidgetInst WHERE WidgetInstId = 3501) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3502) END FROM WidgetInst WHERE WidgetInstId = 3502) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3503) END FROM WidgetInst WHERE WidgetInstId = 3503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3504) END FROM WidgetInst WHERE WidgetInstId = 3504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3505) END FROM WidgetInst WHERE WidgetInstId = 3505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3387) END FROM WidgetInst WHERE WidgetInstId = 3387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3388) END FROM WidgetInst WHERE WidgetInstId = 3388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3389) END FROM WidgetInst WHERE WidgetInstId = 3389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3390) END FROM WidgetInst WHERE WidgetInstId = 3390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3391) END FROM WidgetInst WHERE WidgetInstId = 3391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3393) END FROM WidgetInst WHERE WidgetInstId = 3393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3387) END FROM WidgetInst WHERE WidgetInstId = 3387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3388) END FROM WidgetInst WHERE WidgetInstId = 3388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3389) END FROM WidgetInst WHERE WidgetInstId = 3389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3390) END FROM WidgetInst WHERE WidgetInstId = 3390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3391) END FROM WidgetInst WHERE WidgetInstId = 3391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3393) END FROM WidgetInst WHERE WidgetInstId = 3393) = 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 = 'Rating Curve' AND WidgetInstId = 3499) END FROM WidgetInst WHERE WidgetInstId = 3499) = 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 = 'Rating Curve' AND WidgetInstId = 3500) END FROM WidgetInst WHERE WidgetInstId = 3500) = 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 = 'Rating Curve' AND WidgetInstId = 3501) END FROM WidgetInst WHERE WidgetInstId = 3501) = 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 = 'Rating Curve' AND WidgetInstId = 3502) END FROM WidgetInst WHERE WidgetInstId = 3502) = 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 = 'Rating Curve' AND WidgetInstId = 3503) END FROM WidgetInst WHERE WidgetInstId = 3503) = 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 = 'Rating Curve' AND WidgetInstId = 3504) END FROM WidgetInst WHERE WidgetInstId = 3504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3505) END FROM WidgetInst WHERE WidgetInstId = 3505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3387) END FROM WidgetInst WHERE WidgetInstId = 3387) = 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 = 'U.S. Customary' AND WidgetInstId = 3388) END FROM WidgetInst WHERE WidgetInstId = 3388) = 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 = 'U.S. Customary' AND WidgetInstId = 3389) END FROM WidgetInst WHERE WidgetInstId = 3389) = 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 = 'U.S. Customary' AND WidgetInstId = 3390) END FROM WidgetInst WHERE WidgetInstId = 3390) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3391) END FROM WidgetInst WHERE WidgetInstId = 3391) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3393) END FROM WidgetInst WHERE WidgetInstId = 3393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3387) END FROM WidgetInst WHERE WidgetInstId = 3387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3388) END FROM WidgetInst WHERE WidgetInstId = 3388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3389) END FROM WidgetInst WHERE WidgetInstId = 3389) = 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 = 'Metric' AND WidgetInstId = 3390) END FROM WidgetInst WHERE WidgetInstId = 3390) = 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 = 'Metric' AND WidgetInstId = 3391) END FROM WidgetInst WHERE WidgetInstId = 3391) = 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 = 'Metric' AND WidgetInstId = 3392) END FROM WidgetInst WHERE WidgetInstId = 3392) = 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 = 'Metric' AND WidgetInstId = 3393) END FROM WidgetInst WHERE WidgetInstId = 3393) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3814) END FROM WidgetInst WHERE WidgetInstId = 3814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3815) END FROM WidgetInst WHERE WidgetInstId = 3815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3816) END FROM WidgetInst WHERE WidgetInstId = 3816) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3817) END FROM WidgetInst WHERE WidgetInstId = 3817) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3818) END FROM WidgetInst WHERE WidgetInstId = 3818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3819) END FROM WidgetInst WHERE WidgetInstId = 3819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3820) END FROM WidgetInst WHERE WidgetInstId = 3820) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3814) END FROM WidgetInst WHERE WidgetInstId = 3814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3815) END FROM WidgetInst WHERE WidgetInstId = 3815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3816) END FROM WidgetInst WHERE WidgetInstId = 3816) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3817) END FROM WidgetInst WHERE WidgetInstId = 3817) = 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 = 'user' AND WidgetInstId = 3818) END FROM WidgetInst WHERE WidgetInstId = 3818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3819) END FROM WidgetInst WHERE WidgetInstId = 3819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3820) END FROM WidgetInst WHERE WidgetInstId = 3820) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3814) END FROM WidgetInst WHERE WidgetInstId = 3814) = 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 = 'user' AND WidgetInstId = 3815) END FROM WidgetInst WHERE WidgetInstId = 3815) = 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 = 'user' AND WidgetInstId = 3816) END FROM WidgetInst WHERE WidgetInstId = 3816) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3817) END FROM WidgetInst WHERE WidgetInstId = 3817) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3818) END FROM WidgetInst WHERE WidgetInstId = 3818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3819) END FROM WidgetInst WHERE WidgetInstId = 3819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3854;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3820) END FROM WidgetInst WHERE WidgetInstId = 3820) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3855;


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 = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) = 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 = 'Weir' AND WidgetInstId = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) = 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 = 'Weir' AND WidgetInstId = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) = 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 = 'Weir' AND WidgetInstId = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) = 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 = 'Weir' AND WidgetInstId = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) = 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 = 'Weir' AND WidgetInstId = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) = 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 = 'Weir' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3926) END FROM WidgetInst WHERE WidgetInstId = 3926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3927) END FROM WidgetInst WHERE WidgetInstId = 3927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3928) END FROM WidgetInst WHERE WidgetInstId = 3928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3929) END FROM WidgetInst WHERE WidgetInstId = 3929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3930) END FROM WidgetInst WHERE WidgetInstId = 3930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3931) END FROM WidgetInst WHERE WidgetInstId = 3931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3932) END FROM WidgetInst WHERE WidgetInstId = 3932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3926) END FROM WidgetInst WHERE WidgetInstId = 3926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3927) END FROM WidgetInst WHERE WidgetInstId = 3927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3928) END FROM WidgetInst WHERE WidgetInstId = 3928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3929) END FROM WidgetInst WHERE WidgetInstId = 3929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3930) END FROM WidgetInst WHERE WidgetInstId = 3930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3931) END FROM WidgetInst WHERE WidgetInstId = 3931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3932) END FROM WidgetInst WHERE WidgetInstId = 3932) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3926) END FROM WidgetInst WHERE WidgetInstId = 3926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3961;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3927) END FROM WidgetInst WHERE WidgetInstId = 3927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3928) END FROM WidgetInst WHERE WidgetInstId = 3928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3929) END FROM WidgetInst WHERE WidgetInstId = 3929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3930) END FROM WidgetInst WHERE WidgetInstId = 3930) = 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 = 'user' AND WidgetInstId = 3931) END FROM WidgetInst WHERE WidgetInstId = 3931) = 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 = 'user' AND WidgetInstId = 3932) END FROM WidgetInst WHERE WidgetInstId = 3932) = 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 = 'Gate' AND WidgetInstId = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4066) END FROM WidgetInst WHERE WidgetInstId = 4066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4067) END FROM WidgetInst WHERE WidgetInstId = 4067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4068) END FROM WidgetInst WHERE WidgetInstId = 4068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4069) END FROM WidgetInst WHERE WidgetInstId = 4069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4070) END FROM WidgetInst WHERE WidgetInstId = 4070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4071) END FROM WidgetInst WHERE WidgetInstId = 4071) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4072) END FROM WidgetInst WHERE WidgetInstId = 4072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4066) END FROM WidgetInst WHERE WidgetInstId = 4066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4087;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4067) END FROM WidgetInst WHERE WidgetInstId = 4067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4068) END FROM WidgetInst WHERE WidgetInstId = 4068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4069) END FROM WidgetInst WHERE WidgetInstId = 4069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4090;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4070) END FROM WidgetInst WHERE WidgetInstId = 4070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4071) END FROM WidgetInst WHERE WidgetInstId = 4071) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4072) END FROM WidgetInst WHERE WidgetInstId = 4072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4093;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4066) END FROM WidgetInst WHERE WidgetInstId = 4066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4067) END FROM WidgetInst WHERE WidgetInstId = 4067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4068) END FROM WidgetInst WHERE WidgetInstId = 4068) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4069) END FROM WidgetInst WHERE WidgetInstId = 4069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4070) END FROM WidgetInst WHERE WidgetInstId = 4070) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4071) END FROM WidgetInst WHERE WidgetInstId = 4071) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 4072) END FROM WidgetInst WHERE WidgetInstId = 4072) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4116;


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 = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4117;


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 = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4118;


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 = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4119;


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 = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4120;


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 = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4121;


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 = 4206) END FROM WidgetInst WHERE WidgetInstId = 4206) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4213;


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 = 4207) END FROM WidgetInst WHERE WidgetInstId = 4207) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4208) END FROM WidgetInst WHERE WidgetInstId = 4208) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4209) END FROM WidgetInst WHERE WidgetInstId = 4209) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 4210) END FROM WidgetInst WHERE WidgetInstId = 4210) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4217;


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 = 4211) END FROM WidgetInst WHERE WidgetInstId = 4211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4218;


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 = 4212) END FROM WidgetInst WHERE WidgetInstId = 4212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4219;


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 = 4206) END FROM WidgetInst WHERE WidgetInstId = 4206) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4227;


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 = 4207) END FROM WidgetInst WHERE WidgetInstId = 4207) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4208) END FROM WidgetInst WHERE WidgetInstId = 4208) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 4209) END FROM WidgetInst WHERE WidgetInstId = 4209) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 4210) END FROM WidgetInst WHERE WidgetInstId = 4210) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 4211) END FROM WidgetInst WHERE WidgetInstId = 4211) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 4212) END FROM WidgetInst WHERE WidgetInstId = 4212) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 4206) END FROM WidgetInst WHERE WidgetInstId = 4206) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4207) END FROM WidgetInst WHERE WidgetInstId = 4207) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4242;


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 = 4208) END FROM WidgetInst WHERE WidgetInstId = 4208) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4243;


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 = 4209) END FROM WidgetInst WHERE WidgetInstId = 4209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4210) END FROM WidgetInst WHERE WidgetInstId = 4210) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4245;


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 = 4211) END FROM WidgetInst WHERE WidgetInstId = 4211) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4246;


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 = 4212) END FROM WidgetInst WHERE WidgetInstId = 4212) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4247;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4248) END FROM WidgetInst WHERE WidgetInstId = 4248) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4206) END FROM WidgetInst WHERE WidgetInstId = 4206)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4255;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4249) END FROM WidgetInst WHERE WidgetInstId = 4249) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4207) END FROM WidgetInst WHERE WidgetInstId = 4207)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4256;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4250) END FROM WidgetInst WHERE WidgetInstId = 4250) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4208) END FROM WidgetInst WHERE WidgetInstId = 4208)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4257;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4251) END FROM WidgetInst WHERE WidgetInstId = 4251) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4209) END FROM WidgetInst WHERE WidgetInstId = 4209)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4258;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4252) END FROM WidgetInst WHERE WidgetInstId = 4252) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4210) END FROM WidgetInst WHERE WidgetInstId = 4210)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4259;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4253) END FROM WidgetInst WHERE WidgetInstId = 4253) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4211) END FROM WidgetInst WHERE WidgetInstId = 4211)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4260;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4254) END FROM WidgetInst WHERE WidgetInstId = 4254) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4212) END FROM WidgetInst WHERE WidgetInstId = 4212)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4261;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4248) END FROM WidgetInst WHERE WidgetInstId = 4248) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4206) END FROM WidgetInst WHERE WidgetInstId = 4206)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4269;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4249) END FROM WidgetInst WHERE WidgetInstId = 4249) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4207) END FROM WidgetInst WHERE WidgetInstId = 4207)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4270;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4250) END FROM WidgetInst WHERE WidgetInstId = 4250) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4208) END FROM WidgetInst WHERE WidgetInstId = 4208)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4271;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4251) END FROM WidgetInst WHERE WidgetInstId = 4251) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4209) END FROM WidgetInst WHERE WidgetInstId = 4209)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4272;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4252) END FROM WidgetInst WHERE WidgetInstId = 4252) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4210) END FROM WidgetInst WHERE WidgetInstId = 4210)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4273;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4253) END FROM WidgetInst WHERE WidgetInstId = 4253) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4211) END FROM WidgetInst WHERE WidgetInstId = 4211)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4274;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4254) END FROM WidgetInst WHERE WidgetInstId = 4254) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4212) END FROM WidgetInst WHERE WidgetInstId = 4212)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4275;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4248) END FROM WidgetInst WHERE WidgetInstId = 4248) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4206) END FROM WidgetInst WHERE WidgetInstId = 4206)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4283;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4249) END FROM WidgetInst WHERE WidgetInstId = 4249) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4207) END FROM WidgetInst WHERE WidgetInstId = 4207)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4284;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4250) END FROM WidgetInst WHERE WidgetInstId = 4250) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4208) END FROM WidgetInst WHERE WidgetInstId = 4208)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4285;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4251) END FROM WidgetInst WHERE WidgetInstId = 4251) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4209) END FROM WidgetInst WHERE WidgetInstId = 4209)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4286;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4252) END FROM WidgetInst WHERE WidgetInstId = 4252) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4210) END FROM WidgetInst WHERE WidgetInstId = 4210)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4287;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4253) END FROM WidgetInst WHERE WidgetInstId = 4253) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4211) END FROM WidgetInst WHERE WidgetInstId = 4211)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4288;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4254) END FROM WidgetInst WHERE WidgetInstId = 4254) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 4212) END FROM WidgetInst WHERE WidgetInstId = 4212)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4289;


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 = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4297;


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 = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4298;


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 = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) = 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 = 'Internal sink' AND WidgetInstId = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) = 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 = 'Internal sink' AND WidgetInstId = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4301;


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 = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4302;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4311) END FROM WidgetInst WHERE WidgetInstId = 4311) = 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 = 'Constant' AND WidgetInstId = 4312) END FROM WidgetInst WHERE WidgetInstId = 4312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4313) END FROM WidgetInst WHERE WidgetInstId = 4313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4314) END FROM WidgetInst WHERE WidgetInstId = 4314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4315) END FROM WidgetInst WHERE WidgetInstId = 4315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4316) END FROM WidgetInst WHERE WidgetInstId = 4316) = 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 = 'Constant' AND WidgetInstId = 4317) END FROM WidgetInst WHERE WidgetInstId = 4317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4324;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4311) END FROM WidgetInst WHERE WidgetInstId = 4311) = 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 = 'Time Series' AND WidgetInstId = 4312) END FROM WidgetInst WHERE WidgetInstId = 4312) = 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 = 'Time Series' AND WidgetInstId = 4313) END FROM WidgetInst WHERE WidgetInstId = 4313) = 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 = 'Time Series' AND WidgetInstId = 4314) END FROM WidgetInst WHERE WidgetInstId = 4314) = 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 = 'Time Series' AND WidgetInstId = 4315) END FROM WidgetInst WHERE WidgetInstId = 4315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4316) END FROM WidgetInst WHERE WidgetInstId = 4316) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4317) END FROM WidgetInst WHERE WidgetInstId = 4317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4311) END FROM WidgetInst WHERE WidgetInstId = 4311) = 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 = 'Weir' AND WidgetInstId = 4312) END FROM WidgetInst WHERE WidgetInstId = 4312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4313) END FROM WidgetInst WHERE WidgetInstId = 4313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4362;


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 = 4314) END FROM WidgetInst WHERE WidgetInstId = 4314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 4315) END FROM WidgetInst WHERE WidgetInstId = 4315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4364;


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 = 4316) END FROM WidgetInst WHERE WidgetInstId = 4316) = 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 = 'Weir' AND WidgetInstId = 4317) END FROM WidgetInst WHERE WidgetInstId = 4317) = 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 = 'Rating curve' AND WidgetInstId = 4311) END FROM WidgetInst WHERE WidgetInstId = 4311) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4312) END FROM WidgetInst WHERE WidgetInstId = 4312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4313) END FROM WidgetInst WHERE WidgetInstId = 4313) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4314) END FROM WidgetInst WHERE WidgetInstId = 4314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4315) END FROM WidgetInst WHERE WidgetInstId = 4315) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4316) END FROM WidgetInst WHERE WidgetInstId = 4316) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4317) END FROM WidgetInst WHERE WidgetInstId = 4317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4443;


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 = 3086) END FROM WidgetInst WHERE WidgetInstId = 3086) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4458;


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 = 3087) END FROM WidgetInst WHERE WidgetInstId = 3087) = 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 = 'Link' AND WidgetInstId = 3088) END FROM WidgetInst WHERE WidgetInstId = 3088) = 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 = 'Link' AND WidgetInstId = 3089) END FROM WidgetInst WHERE WidgetInstId = 3089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4461;


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 = 3090) END FROM WidgetInst WHERE WidgetInstId = 3090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4462;


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 = 3091) END FROM WidgetInst WHERE WidgetInstId = 3091) = 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 = 'Link' AND WidgetInstId = 3092) END FROM WidgetInst WHERE WidgetInstId = 3092) = 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 = 'Constant' AND WidgetInstId = 4479) END FROM WidgetInst WHERE WidgetInstId = 4479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4480) END FROM WidgetInst WHERE WidgetInstId = 4480) = 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 = 'Constant' AND WidgetInstId = 4481) END FROM WidgetInst WHERE WidgetInstId = 4481) = 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 = 'Constant' AND WidgetInstId = 4482) END FROM WidgetInst WHERE WidgetInstId = 4482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4483) END FROM WidgetInst WHERE WidgetInstId = 4483) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4484) END FROM WidgetInst WHERE WidgetInstId = 4484) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 4485) END FROM WidgetInst WHERE WidgetInstId = 4485) = 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 = 'Time Series' AND WidgetInstId = 4479) END FROM WidgetInst WHERE WidgetInstId = 4479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4480) END FROM WidgetInst WHERE WidgetInstId = 4480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4481) END FROM WidgetInst WHERE WidgetInstId = 4481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4482) END FROM WidgetInst WHERE WidgetInstId = 4482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4483) END FROM WidgetInst WHERE WidgetInstId = 4483) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4484) END FROM WidgetInst WHERE WidgetInstId = 4484) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 4485) END FROM WidgetInst WHERE WidgetInstId = 4485) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4513;


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 = 4479) END FROM WidgetInst WHERE WidgetInstId = 4479) = 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 = 'Weir' AND WidgetInstId = 4480) END FROM WidgetInst WHERE WidgetInstId = 4480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4529;


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 = 4481) END FROM WidgetInst WHERE WidgetInstId = 4481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4530;


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 = 4482) END FROM WidgetInst WHERE WidgetInstId = 4482) = 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 = 'Weir' AND WidgetInstId = 4483) END FROM WidgetInst WHERE WidgetInstId = 4483) = 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 = 'Weir' AND WidgetInstId = 4484) END FROM WidgetInst WHERE WidgetInstId = 4484) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4533;


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 = 4485) END FROM WidgetInst WHERE WidgetInstId = 4485) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 4479) END FROM WidgetInst WHERE WidgetInstId = 4479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 4605;


