# QueryInst

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 7169) END FROM WidgetInst WHERE WidgetInstId = 7169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7696;


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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7713;


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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7714;


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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7715;


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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7716;


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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7717;


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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7718;


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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7719;


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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7729) END FROM WidgetInst WHERE WidgetInstId = 7729) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7737;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7730) END FROM WidgetInst WHERE WidgetInstId = 7730) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7738;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7731) END FROM WidgetInst WHERE WidgetInstId = 7731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7739;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7732) END FROM WidgetInst WHERE WidgetInstId = 7732) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7733) END FROM WidgetInst WHERE WidgetInstId = 7733) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7741;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7734) END FROM WidgetInst WHERE WidgetInstId = 7734) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7742;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7735) END FROM WidgetInst WHERE WidgetInstId = 7735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7736) END FROM WidgetInst WHERE WidgetInstId = 7736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7729) END FROM WidgetInst WHERE WidgetInstId = 7729) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7730) END FROM WidgetInst WHERE WidgetInstId = 7730) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7731) END FROM WidgetInst WHERE WidgetInstId = 7731) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7732) END FROM WidgetInst WHERE WidgetInstId = 7732) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7733) END FROM WidgetInst WHERE WidgetInstId = 7733) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7734) END FROM WidgetInst WHERE WidgetInstId = 7734) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7735) END FROM WidgetInst WHERE WidgetInstId = 7735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7736) END FROM WidgetInst WHERE WidgetInstId = 7736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7768;


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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7785;


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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7786;


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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7787;


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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7788;


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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7789;


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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7790;


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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7791;


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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7801) END FROM WidgetInst WHERE WidgetInstId = 7801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7802) END FROM WidgetInst WHERE WidgetInstId = 7802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7803) END FROM WidgetInst WHERE WidgetInstId = 7803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7804) END FROM WidgetInst WHERE WidgetInstId = 7804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7805) END FROM WidgetInst WHERE WidgetInstId = 7805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7813;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7806) END FROM WidgetInst WHERE WidgetInstId = 7806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7807) END FROM WidgetInst WHERE WidgetInstId = 7807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7808) END FROM WidgetInst WHERE WidgetInstId = 7808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7801) END FROM WidgetInst WHERE WidgetInstId = 7801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7802) END FROM WidgetInst WHERE WidgetInstId = 7802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7803) END FROM WidgetInst WHERE WidgetInstId = 7803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7804) END FROM WidgetInst WHERE WidgetInstId = 7804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7805) END FROM WidgetInst WHERE WidgetInstId = 7805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7806) END FROM WidgetInst WHERE WidgetInstId = 7806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7807) END FROM WidgetInst WHERE WidgetInstId = 7807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7808) END FROM WidgetInst WHERE WidgetInstId = 7808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7801) END FROM WidgetInst WHERE WidgetInstId = 7801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7802) END FROM WidgetInst WHERE WidgetInstId = 7802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7803) END FROM WidgetInst WHERE WidgetInstId = 7803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7804) END FROM WidgetInst WHERE WidgetInstId = 7804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7805) END FROM WidgetInst WHERE WidgetInstId = 7805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7806) END FROM WidgetInst WHERE WidgetInstId = 7806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7807) END FROM WidgetInst WHERE WidgetInstId = 7807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7808) END FROM WidgetInst WHERE WidgetInstId = 7808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7864;


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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7881;


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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7882;


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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7883;


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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7884;


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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7885;


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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7886;


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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7887;


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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7888;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7897) END FROM WidgetInst WHERE WidgetInstId = 7897)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7921;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7898) END FROM WidgetInst WHERE WidgetInstId = 7898)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7922;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7899) END FROM WidgetInst WHERE WidgetInstId = 7899)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7923;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7900) END FROM WidgetInst WHERE WidgetInstId = 7900)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7924;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7901) END FROM WidgetInst WHERE WidgetInstId = 7901)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7925;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7902) END FROM WidgetInst WHERE WidgetInstId = 7902)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7926;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7903) END FROM WidgetInst WHERE WidgetInstId = 7903)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7927;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7904) END FROM WidgetInst WHERE WidgetInstId = 7904)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7915) END FROM WidgetInst WHERE WidgetInstId = 7915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7916) END FROM WidgetInst WHERE WidgetInstId = 7916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7917) END FROM WidgetInst WHERE WidgetInstId = 7917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7918) END FROM WidgetInst WHERE WidgetInstId = 7918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7915) END FROM WidgetInst WHERE WidgetInstId = 7915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7916) END FROM WidgetInst WHERE WidgetInstId = 7916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7917) END FROM WidgetInst WHERE WidgetInstId = 7917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7918) END FROM WidgetInst WHERE WidgetInstId = 7918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7915) END FROM WidgetInst WHERE WidgetInstId = 7915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7916) END FROM WidgetInst WHERE WidgetInstId = 7916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7917) END FROM WidgetInst WHERE WidgetInstId = 7917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7918) END FROM WidgetInst WHERE WidgetInstId = 7918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7983;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7984;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7915) END FROM WidgetInst WHERE WidgetInstId = 7915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7987;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7916) END FROM WidgetInst WHERE WidgetInstId = 7916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7917) END FROM WidgetInst WHERE WidgetInstId = 7917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7918) END FROM WidgetInst WHERE WidgetInstId = 7918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7992;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7897) END FROM WidgetInst WHERE WidgetInstId = 7897)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7993;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7898) END FROM WidgetInst WHERE WidgetInstId = 7898)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7994;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7899) END FROM WidgetInst WHERE WidgetInstId = 7899)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7995;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7900) END FROM WidgetInst WHERE WidgetInstId = 7900)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7996;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7901) END FROM WidgetInst WHERE WidgetInstId = 7901)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7997;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7902) END FROM WidgetInst WHERE WidgetInstId = 7902)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7998;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7903) END FROM WidgetInst WHERE WidgetInstId = 7903)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7999;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7904) END FROM WidgetInst WHERE WidgetInstId = 7904)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8018;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7915) END FROM WidgetInst WHERE WidgetInstId = 7915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7916) END FROM WidgetInst WHERE WidgetInstId = 7916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7917) END FROM WidgetInst WHERE WidgetInstId = 7917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7918) END FROM WidgetInst WHERE WidgetInstId = 7918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7915) END FROM WidgetInst WHERE WidgetInstId = 7915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7916) END FROM WidgetInst WHERE WidgetInstId = 7916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7917) END FROM WidgetInst WHERE WidgetInstId = 7917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7918) END FROM WidgetInst WHERE WidgetInstId = 7918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8041) END FROM WidgetInst WHERE WidgetInstId = 8041) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8042) END FROM WidgetInst WHERE WidgetInstId = 8042) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8050;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8043) END FROM WidgetInst WHERE WidgetInstId = 8043) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8044) END FROM WidgetInst WHERE WidgetInstId = 8044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8052;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8045) END FROM WidgetInst WHERE WidgetInstId = 8045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8046) END FROM WidgetInst WHERE WidgetInstId = 8046) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8047) END FROM WidgetInst WHERE WidgetInstId = 8047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8048) END FROM WidgetInst WHERE WidgetInstId = 8048) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7915) END FROM WidgetInst WHERE WidgetInstId = 7915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7916) END FROM WidgetInst WHERE WidgetInstId = 7916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7917) END FROM WidgetInst WHERE WidgetInstId = 7917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7918) END FROM WidgetInst WHERE WidgetInstId = 7918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7915) END FROM WidgetInst WHERE WidgetInstId = 7915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7916) END FROM WidgetInst WHERE WidgetInstId = 7916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7917) END FROM WidgetInst WHERE WidgetInstId = 7917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7918) END FROM WidgetInst WHERE WidgetInstId = 7918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8041) END FROM WidgetInst WHERE WidgetInstId = 8041) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8081;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8042) END FROM WidgetInst WHERE WidgetInstId = 8042) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8043) END FROM WidgetInst WHERE WidgetInstId = 8043) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8044) END FROM WidgetInst WHERE WidgetInstId = 8044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8045) END FROM WidgetInst WHERE WidgetInstId = 8045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8046) END FROM WidgetInst WHERE WidgetInstId = 8046) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8086;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8047) END FROM WidgetInst WHERE WidgetInstId = 8047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8087;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8048) END FROM WidgetInst WHERE WidgetInstId = 8048) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8097;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8098;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7915) END FROM WidgetInst WHERE WidgetInstId = 7915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7916) END FROM WidgetInst WHERE WidgetInstId = 7916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7917) END FROM WidgetInst WHERE WidgetInstId = 7917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7918) END FROM WidgetInst WHERE WidgetInstId = 7918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7913) END FROM WidgetInst WHERE WidgetInstId = 7913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7914) END FROM WidgetInst WHERE WidgetInstId = 7914) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7915) END FROM WidgetInst WHERE WidgetInstId = 7915) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7916) END FROM WidgetInst WHERE WidgetInstId = 7916) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7917) END FROM WidgetInst WHERE WidgetInstId = 7917) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7918) END FROM WidgetInst WHERE WidgetInstId = 7918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7919) END FROM WidgetInst WHERE WidgetInstId = 7919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8112;


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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8113;


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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8114;


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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8115;


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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8116;


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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8117;


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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8118;


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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8119;


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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8120;


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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8137;


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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8138;


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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8139;


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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8140;


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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8141;


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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8142;


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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8143;


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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8401) END FROM WidgetInst WHERE WidgetInstId = 8401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8402) END FROM WidgetInst WHERE WidgetInstId = 8402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8403) END FROM WidgetInst WHERE WidgetInstId = 8403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8404) END FROM WidgetInst WHERE WidgetInstId = 8404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8405) END FROM WidgetInst WHERE WidgetInstId = 8405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8406) END FROM WidgetInst WHERE WidgetInstId = 8406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8407) END FROM WidgetInst WHERE WidgetInstId = 8407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8408) END FROM WidgetInst WHERE WidgetInstId = 8408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8401) END FROM WidgetInst WHERE WidgetInstId = 8401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8402) END FROM WidgetInst WHERE WidgetInstId = 8402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8403) END FROM WidgetInst WHERE WidgetInstId = 8403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8404) END FROM WidgetInst WHERE WidgetInstId = 8404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8405) END FROM WidgetInst WHERE WidgetInstId = 8405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8406) END FROM WidgetInst WHERE WidgetInstId = 8406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8407) END FROM WidgetInst WHERE WidgetInstId = 8407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8408) END FROM WidgetInst WHERE WidgetInstId = 8408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8401) END FROM WidgetInst WHERE WidgetInstId = 8401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8402) END FROM WidgetInst WHERE WidgetInstId = 8402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8403) END FROM WidgetInst WHERE WidgetInstId = 8403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8404) END FROM WidgetInst WHERE WidgetInstId = 8404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8405) END FROM WidgetInst WHERE WidgetInstId = 8405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8406) END FROM WidgetInst WHERE WidgetInstId = 8406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8407) END FROM WidgetInst WHERE WidgetInstId = 8407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8408) END FROM WidgetInst WHERE WidgetInstId = 8408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8448;


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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8457;


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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8458;


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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8459;


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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8460;


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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8461;


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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8462;


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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8463;


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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8529) END FROM WidgetInst WHERE WidgetInstId = 8529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8530) END FROM WidgetInst WHERE WidgetInstId = 8530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8531) END FROM WidgetInst WHERE WidgetInstId = 8531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8532) END FROM WidgetInst WHERE WidgetInstId = 8532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8533) END FROM WidgetInst WHERE WidgetInstId = 8533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8534) END FROM WidgetInst WHERE WidgetInstId = 8534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8535) END FROM WidgetInst WHERE WidgetInstId = 8535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8536) END FROM WidgetInst WHERE WidgetInstId = 8536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8529) END FROM WidgetInst WHERE WidgetInstId = 8529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8530) END FROM WidgetInst WHERE WidgetInstId = 8530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8531) END FROM WidgetInst WHERE WidgetInstId = 8531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8532) END FROM WidgetInst WHERE WidgetInstId = 8532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8533) END FROM WidgetInst WHERE WidgetInstId = 8533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8534) END FROM WidgetInst WHERE WidgetInstId = 8534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8535) END FROM WidgetInst WHERE WidgetInstId = 8535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8536) END FROM WidgetInst WHERE WidgetInstId = 8536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8529) END FROM WidgetInst WHERE WidgetInstId = 8529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8530) END FROM WidgetInst WHERE WidgetInstId = 8530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8531) END FROM WidgetInst WHERE WidgetInstId = 8531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8532) END FROM WidgetInst WHERE WidgetInstId = 8532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8533) END FROM WidgetInst WHERE WidgetInstId = 8533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8534) END FROM WidgetInst WHERE WidgetInstId = 8534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8535) END FROM WidgetInst WHERE WidgetInstId = 8535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8536) END FROM WidgetInst WHERE WidgetInstId = 8536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8576;


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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8585;


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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8586;


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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8587;


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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8588;


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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8589;


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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8590;


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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8591;


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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8689) END FROM WidgetInst WHERE WidgetInstId = 8689) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8690) END FROM WidgetInst WHERE WidgetInstId = 8690) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8691) END FROM WidgetInst WHERE WidgetInstId = 8691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8692) END FROM WidgetInst WHERE WidgetInstId = 8692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8693) END FROM WidgetInst WHERE WidgetInstId = 8693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8701;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8694) END FROM WidgetInst WHERE WidgetInstId = 8694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8702;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8695) END FROM WidgetInst WHERE WidgetInstId = 8695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8696) END FROM WidgetInst WHERE WidgetInstId = 8696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8689) END FROM WidgetInst WHERE WidgetInstId = 8689) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8690) END FROM WidgetInst WHERE WidgetInstId = 8690) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8691) END FROM WidgetInst WHERE WidgetInstId = 8691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8692) END FROM WidgetInst WHERE WidgetInstId = 8692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8693) END FROM WidgetInst WHERE WidgetInstId = 8693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8694) END FROM WidgetInst WHERE WidgetInstId = 8694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8695) END FROM WidgetInst WHERE WidgetInstId = 8695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8696) END FROM WidgetInst WHERE WidgetInstId = 8696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8689) END FROM WidgetInst WHERE WidgetInstId = 8689) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8690) END FROM WidgetInst WHERE WidgetInstId = 8690) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8691) END FROM WidgetInst WHERE WidgetInstId = 8691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8692) END FROM WidgetInst WHERE WidgetInstId = 8692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8693) END FROM WidgetInst WHERE WidgetInstId = 8693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8694) END FROM WidgetInst WHERE WidgetInstId = 8694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8695) END FROM WidgetInst WHERE WidgetInstId = 8695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8696) END FROM WidgetInst WHERE WidgetInstId = 8696) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8736;


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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8745;


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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8746;


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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8747;


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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8748;


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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8749;


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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8750;


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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8751;


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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8752;


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 = 8849) END FROM WidgetInst WHERE WidgetInstId = 8849) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8857;


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 = 8850) END FROM WidgetInst WHERE WidgetInstId = 8850) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8858;


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 = 8851) END FROM WidgetInst WHERE WidgetInstId = 8851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8859;


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 = 8852) END FROM WidgetInst WHERE WidgetInstId = 8852) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8860;


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 = 8853) END FROM WidgetInst WHERE WidgetInstId = 8853) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8861;


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 = 8854) END FROM WidgetInst WHERE WidgetInstId = 8854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8862;


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 = 8855) END FROM WidgetInst WHERE WidgetInstId = 8855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8863;


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 = 8856) END FROM WidgetInst WHERE WidgetInstId = 8856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8864;


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 = 8849) END FROM WidgetInst WHERE WidgetInstId = 8849) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8873;


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 = 8850) END FROM WidgetInst WHERE WidgetInstId = 8850) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8874;


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 = 8851) END FROM WidgetInst WHERE WidgetInstId = 8851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8875;


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 = 8852) END FROM WidgetInst WHERE WidgetInstId = 8852) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8876;


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 = 8853) END FROM WidgetInst WHERE WidgetInstId = 8853) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8877;


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 = 8854) END FROM WidgetInst WHERE WidgetInstId = 8854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8878;


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 = 8855) END FROM WidgetInst WHERE WidgetInstId = 8855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8879;


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 = 8856) END FROM WidgetInst WHERE WidgetInstId = 8856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8880;


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 = 8849) END FROM WidgetInst WHERE WidgetInstId = 8849) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8889;


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 = 8850) END FROM WidgetInst WHERE WidgetInstId = 8850) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8890;


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 = 8851) END FROM WidgetInst WHERE WidgetInstId = 8851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8891;


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 = 8852) END FROM WidgetInst WHERE WidgetInstId = 8852) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8892;


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 = 8853) END FROM WidgetInst WHERE WidgetInstId = 8853) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8893;


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 = 8854) END FROM WidgetInst WHERE WidgetInstId = 8854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8894;


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 = 8855) END FROM WidgetInst WHERE WidgetInstId = 8855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8895;


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 = 8856) END FROM WidgetInst WHERE WidgetInstId = 8856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8896;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8897) END FROM WidgetInst WHERE WidgetInstId = 8897) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8849) END FROM WidgetInst WHERE WidgetInstId = 8849)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8905;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8898) END FROM WidgetInst WHERE WidgetInstId = 8898) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8850) END FROM WidgetInst WHERE WidgetInstId = 8850)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8906;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8899) END FROM WidgetInst WHERE WidgetInstId = 8899) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8851) END FROM WidgetInst WHERE WidgetInstId = 8851)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8907;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8900) END FROM WidgetInst WHERE WidgetInstId = 8900) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8852) END FROM WidgetInst WHERE WidgetInstId = 8852)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8908;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8901) END FROM WidgetInst WHERE WidgetInstId = 8901) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8853) END FROM WidgetInst WHERE WidgetInstId = 8853)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8909;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8902) END FROM WidgetInst WHERE WidgetInstId = 8902) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8854) END FROM WidgetInst WHERE WidgetInstId = 8854)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8910;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8903) END FROM WidgetInst WHERE WidgetInstId = 8903) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8855) END FROM WidgetInst WHERE WidgetInstId = 8855)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8911;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8904) END FROM WidgetInst WHERE WidgetInstId = 8904) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8856) END FROM WidgetInst WHERE WidgetInstId = 8856)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8912;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8897) END FROM WidgetInst WHERE WidgetInstId = 8897) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8849) END FROM WidgetInst WHERE WidgetInstId = 8849)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8921;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8898) END FROM WidgetInst WHERE WidgetInstId = 8898) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8850) END FROM WidgetInst WHERE WidgetInstId = 8850)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8922;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8899) END FROM WidgetInst WHERE WidgetInstId = 8899) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8851) END FROM WidgetInst WHERE WidgetInstId = 8851)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8923;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8900) END FROM WidgetInst WHERE WidgetInstId = 8900) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8852) END FROM WidgetInst WHERE WidgetInstId = 8852)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8924;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8901) END FROM WidgetInst WHERE WidgetInstId = 8901) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8853) END FROM WidgetInst WHERE WidgetInstId = 8853)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8925;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8902) END FROM WidgetInst WHERE WidgetInstId = 8902) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8854) END FROM WidgetInst WHERE WidgetInstId = 8854)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8926;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8903) END FROM WidgetInst WHERE WidgetInstId = 8903) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8855) END FROM WidgetInst WHERE WidgetInstId = 8855)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8927;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8904) END FROM WidgetInst WHERE WidgetInstId = 8904) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8856) END FROM WidgetInst WHERE WidgetInstId = 8856)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8928;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8897) END FROM WidgetInst WHERE WidgetInstId = 8897) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8849) END FROM WidgetInst WHERE WidgetInstId = 8849)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8937;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8898) END FROM WidgetInst WHERE WidgetInstId = 8898) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8850) END FROM WidgetInst WHERE WidgetInstId = 8850)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8938;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8899) END FROM WidgetInst WHERE WidgetInstId = 8899) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8851) END FROM WidgetInst WHERE WidgetInstId = 8851)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8939;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8900) END FROM WidgetInst WHERE WidgetInstId = 8900) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8852) END FROM WidgetInst WHERE WidgetInstId = 8852)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8940;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8901) END FROM WidgetInst WHERE WidgetInstId = 8901) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8853) END FROM WidgetInst WHERE WidgetInstId = 8853)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8941;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8902) END FROM WidgetInst WHERE WidgetInstId = 8902) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8854) END FROM WidgetInst WHERE WidgetInstId = 8854)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8942;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8903) END FROM WidgetInst WHERE WidgetInstId = 8903) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8855) END FROM WidgetInst WHERE WidgetInstId = 8855)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8943;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8904) END FROM WidgetInst WHERE WidgetInstId = 8904) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8856) END FROM WidgetInst WHERE WidgetInstId = 8856)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8944;


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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8953;


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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8954;


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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8955;


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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8956;


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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8957;


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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8958;


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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8959;


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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8970) END FROM WidgetInst WHERE WidgetInstId = 8970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8971) END FROM WidgetInst WHERE WidgetInstId = 8971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8973) END FROM WidgetInst WHERE WidgetInstId = 8973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8974) END FROM WidgetInst WHERE WidgetInstId = 8974) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8975) END FROM WidgetInst WHERE WidgetInstId = 8975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8983;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8976) END FROM WidgetInst WHERE WidgetInstId = 8976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8984;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8970) END FROM WidgetInst WHERE WidgetInstId = 8970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8971) END FROM WidgetInst WHERE WidgetInstId = 8971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8973) END FROM WidgetInst WHERE WidgetInstId = 8973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8974) END FROM WidgetInst WHERE WidgetInstId = 8974) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8975) END FROM WidgetInst WHERE WidgetInstId = 8975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8976) END FROM WidgetInst WHERE WidgetInstId = 8976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9008;


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 = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9025;


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 = 8970) END FROM WidgetInst WHERE WidgetInstId = 8970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9026;


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 = 8971) END FROM WidgetInst WHERE WidgetInstId = 8971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9027;


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 = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9028;


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 = 8973) END FROM WidgetInst WHERE WidgetInstId = 8973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9029;


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 = 8974) END FROM WidgetInst WHERE WidgetInstId = 8974) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9030;


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 = 8975) END FROM WidgetInst WHERE WidgetInstId = 8975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9031;


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 = 8976) END FROM WidgetInst WHERE WidgetInstId = 8976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9113;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8970) END FROM WidgetInst WHERE WidgetInstId = 8970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8971) END FROM WidgetInst WHERE WidgetInstId = 8971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8972) END FROM WidgetInst WHERE WidgetInstId = 8972) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8973) END FROM WidgetInst WHERE WidgetInstId = 8973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8974) END FROM WidgetInst WHERE WidgetInstId = 8974) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8975) END FROM WidgetInst WHERE WidgetInstId = 8975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8976) END FROM WidgetInst WHERE WidgetInstId = 8976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9120;


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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9137;


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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9138;


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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9139;


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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9140;


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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9141;


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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9142;


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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9143;


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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9161) END FROM WidgetInst WHERE WidgetInstId = 9161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9162) END FROM WidgetInst WHERE WidgetInstId = 9162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9163) END FROM WidgetInst WHERE WidgetInstId = 9163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9164) END FROM WidgetInst WHERE WidgetInstId = 9164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9165) END FROM WidgetInst WHERE WidgetInstId = 9165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9166) END FROM WidgetInst WHERE WidgetInstId = 9166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9167) END FROM WidgetInst WHERE WidgetInstId = 9167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9168) END FROM WidgetInst WHERE WidgetInstId = 9168) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9161) END FROM WidgetInst WHERE WidgetInstId = 9161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9162) END FROM WidgetInst WHERE WidgetInstId = 9162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9163) END FROM WidgetInst WHERE WidgetInstId = 9163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9164) END FROM WidgetInst WHERE WidgetInstId = 9164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9165) END FROM WidgetInst WHERE WidgetInstId = 9165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9166) END FROM WidgetInst WHERE WidgetInstId = 9166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9167) END FROM WidgetInst WHERE WidgetInstId = 9167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9168) END FROM WidgetInst WHERE WidgetInstId = 9168) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9200;


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 = 9161) END FROM WidgetInst WHERE WidgetInstId = 9161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9217;


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 = 9162) END FROM WidgetInst WHERE WidgetInstId = 9162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9218;


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 = 9163) END FROM WidgetInst WHERE WidgetInstId = 9163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9219;


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 = 9164) END FROM WidgetInst WHERE WidgetInstId = 9164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9220;


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 = 9165) END FROM WidgetInst WHERE WidgetInstId = 9165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9221;


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 = 9166) END FROM WidgetInst WHERE WidgetInstId = 9166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9222;


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 = 9167) END FROM WidgetInst WHERE WidgetInstId = 9167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9223;


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 = 9168) END FROM WidgetInst WHERE WidgetInstId = 9168) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9161) END FROM WidgetInst WHERE WidgetInstId = 9161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9162) END FROM WidgetInst WHERE WidgetInstId = 9162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9306;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9163) END FROM WidgetInst WHERE WidgetInstId = 9163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9164) END FROM WidgetInst WHERE WidgetInstId = 9164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9308;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9165) END FROM WidgetInst WHERE WidgetInstId = 9165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9166) END FROM WidgetInst WHERE WidgetInstId = 9166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9167) END FROM WidgetInst WHERE WidgetInstId = 9167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9168) END FROM WidgetInst WHERE WidgetInstId = 9168) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9312;


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 = 9337) END FROM WidgetInst WHERE WidgetInstId = 9337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9345;


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 = 9338) END FROM WidgetInst WHERE WidgetInstId = 9338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9346;


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 = 9339) END FROM WidgetInst WHERE WidgetInstId = 9339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9347;


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 = 9340) END FROM WidgetInst WHERE WidgetInstId = 9340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9348;


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 = 9341) END FROM WidgetInst WHERE WidgetInstId = 9341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9349;


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 = 9342) END FROM WidgetInst WHERE WidgetInstId = 9342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9350;


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 = 9343) END FROM WidgetInst WHERE WidgetInstId = 9343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9351;


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 = 9344) END FROM WidgetInst WHERE WidgetInstId = 9344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9337) END FROM WidgetInst WHERE WidgetInstId = 9337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9338) END FROM WidgetInst WHERE WidgetInstId = 9338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9339) END FROM WidgetInst WHERE WidgetInstId = 9339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9340) END FROM WidgetInst WHERE WidgetInstId = 9340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9341) END FROM WidgetInst WHERE WidgetInstId = 9341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9342) END FROM WidgetInst WHERE WidgetInstId = 9342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9343) END FROM WidgetInst WHERE WidgetInstId = 9343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9344) END FROM WidgetInst WHERE WidgetInstId = 9344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9337) END FROM WidgetInst WHERE WidgetInstId = 9337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9338) END FROM WidgetInst WHERE WidgetInstId = 9338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9339) END FROM WidgetInst WHERE WidgetInstId = 9339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9340) END FROM WidgetInst WHERE WidgetInstId = 9340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9341) END FROM WidgetInst WHERE WidgetInstId = 9341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9342) END FROM WidgetInst WHERE WidgetInstId = 9342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9343) END FROM WidgetInst WHERE WidgetInstId = 9343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9344) END FROM WidgetInst WHERE WidgetInstId = 9344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9337) END FROM WidgetInst WHERE WidgetInstId = 9337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9338) END FROM WidgetInst WHERE WidgetInstId = 9338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9339) END FROM WidgetInst WHERE WidgetInstId = 9339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9340) END FROM WidgetInst WHERE WidgetInstId = 9340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9341) END FROM WidgetInst WHERE WidgetInstId = 9341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9342) END FROM WidgetInst WHERE WidgetInstId = 9342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9343) END FROM WidgetInst WHERE WidgetInstId = 9343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9344) END FROM WidgetInst WHERE WidgetInstId = 9344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9337) END FROM WidgetInst WHERE WidgetInstId = 9337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9338) END FROM WidgetInst WHERE WidgetInstId = 9338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9339) END FROM WidgetInst WHERE WidgetInstId = 9339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9340) END FROM WidgetInst WHERE WidgetInstId = 9340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9341) END FROM WidgetInst WHERE WidgetInstId = 9341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9342) END FROM WidgetInst WHERE WidgetInstId = 9342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9343) END FROM WidgetInst WHERE WidgetInstId = 9343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9344) END FROM WidgetInst WHERE WidgetInstId = 9344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9337) END FROM WidgetInst WHERE WidgetInstId = 9337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9338) END FROM WidgetInst WHERE WidgetInstId = 9338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9339) END FROM WidgetInst WHERE WidgetInstId = 9339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9340) END FROM WidgetInst WHERE WidgetInstId = 9340) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9341) END FROM WidgetInst WHERE WidgetInstId = 9341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9342) END FROM WidgetInst WHERE WidgetInstId = 9342) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9343) END FROM WidgetInst WHERE WidgetInstId = 9343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9344) END FROM WidgetInst WHERE WidgetInstId = 9344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9432;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7172) END FROM WidgetInst WHERE WidgetInstId = 7172)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9441;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7172) END FROM WidgetInst WHERE WidgetInstId = 7172)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9442;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7172) END FROM WidgetInst WHERE WidgetInstId = 7172)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9443;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7172) END FROM WidgetInst WHERE WidgetInstId = 7172)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9444;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7573) END FROM WidgetInst WHERE WidgetInstId = 7573) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7172) END FROM WidgetInst WHERE WidgetInstId = 7172)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9445;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7574) END FROM WidgetInst WHERE WidgetInstId = 7574) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7172) END FROM WidgetInst WHERE WidgetInstId = 7172)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9446;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7575) END FROM WidgetInst WHERE WidgetInstId = 7575) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7172) END FROM WidgetInst WHERE WidgetInstId = 7172)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9447;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7576) END FROM WidgetInst WHERE WidgetInstId = 7576) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7172) END FROM WidgetInst WHERE WidgetInstId = 7172)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9448;


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 = 9457) END FROM WidgetInst WHERE WidgetInstId = 9457) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9465;


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 = 9458) END FROM WidgetInst WHERE WidgetInstId = 9458) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9466;


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 = 9459) END FROM WidgetInst WHERE WidgetInstId = 9459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9467;


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 = 9460) END FROM WidgetInst WHERE WidgetInstId = 9460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9468;


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 = 9461) END FROM WidgetInst WHERE WidgetInstId = 9461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9469;


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 = 9462) END FROM WidgetInst WHERE WidgetInstId = 9462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9470;


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 = 9463) END FROM WidgetInst WHERE WidgetInstId = 9463) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9471;


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 = 9464) END FROM WidgetInst WHERE WidgetInstId = 9464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9472;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9487;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9487;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9487;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9487;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9487;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9487;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9488;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9488;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9488;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9488;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9488;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9488;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9489;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9489;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9489;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9489;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9489;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 9489;


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 = 9487) END FROM WidgetInst WHERE WidgetInstId = 9487) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9490;


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 = 9488) END FROM WidgetInst WHERE WidgetInstId = 9488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9491;


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 = 9489) END FROM WidgetInst WHERE WidgetInstId = 9489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9492;


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 = 9496) END FROM WidgetInst WHERE WidgetInstId = 9496) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9499;


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 = 9497) END FROM WidgetInst WHERE WidgetInstId = 9497) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9500;


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 = 9498) END FROM WidgetInst WHERE WidgetInstId = 9498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9501;


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 = 9487) END FROM WidgetInst WHERE WidgetInstId = 9487) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9505;


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 = 9488) END FROM WidgetInst WHERE WidgetInstId = 9488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9506;


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 = 9489) END FROM WidgetInst WHERE WidgetInstId = 9489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9507;


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 = 7169) END FROM WidgetInst WHERE WidgetInstId = 7169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9523;


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 = 7169) END FROM WidgetInst WHERE WidgetInstId = 7169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9524;


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 = 7169) END FROM WidgetInst WHERE WidgetInstId = 7169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9525;


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 = 7169) END FROM WidgetInst WHERE WidgetInstId = 7169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9532;


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 = 7169) END FROM WidgetInst WHERE WidgetInstId = 7169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9533;


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 = 7169) END FROM WidgetInst WHERE WidgetInstId = 7169) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9534;


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 = 9487) END FROM WidgetInst WHERE WidgetInstId = 9487) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9541;


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 = 9488) END FROM WidgetInst WHERE WidgetInstId = 9488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9542;


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 = 9489) END FROM WidgetInst WHERE WidgetInstId = 9489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9547) END FROM WidgetInst WHERE WidgetInstId = 9547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9548) END FROM WidgetInst WHERE WidgetInstId = 9548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9549) END FROM WidgetInst WHERE WidgetInstId = 9549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9547) END FROM WidgetInst WHERE WidgetInstId = 9547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9559;


