# WidgetDef

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


# QueryInst

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 16654) END FROM WidgetInst WHERE WidgetInstId = 16654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17346;


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 = 16655) END FROM WidgetInst WHERE WidgetInstId = 16655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17347;


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 = 16656) END FROM WidgetInst WHERE WidgetInstId = 16656) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17348;


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 = 16657) END FROM WidgetInst WHERE WidgetInstId = 16657) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17354) END FROM WidgetInst WHERE WidgetInstId = 17354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17355) END FROM WidgetInst WHERE WidgetInstId = 17355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17356) END FROM WidgetInst WHERE WidgetInstId = 17356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17357) END FROM WidgetInst WHERE WidgetInstId = 17357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17354) END FROM WidgetInst WHERE WidgetInstId = 17354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17355) END FROM WidgetInst WHERE WidgetInstId = 17355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17356) END FROM WidgetInst WHERE WidgetInstId = 17356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17357) END FROM WidgetInst WHERE WidgetInstId = 17357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17373;


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 = 17354) END FROM WidgetInst WHERE WidgetInstId = 17354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17382;


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 = 17355) END FROM WidgetInst WHERE WidgetInstId = 17355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17383;


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 = 17356) END FROM WidgetInst WHERE WidgetInstId = 17356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17384;


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 = 17357) END FROM WidgetInst WHERE WidgetInstId = 17357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17354) END FROM WidgetInst WHERE WidgetInstId = 17354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17355) END FROM WidgetInst WHERE WidgetInstId = 17355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17356) END FROM WidgetInst WHERE WidgetInstId = 17356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17357) END FROM WidgetInst WHERE WidgetInstId = 17357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17429;


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 = 16654) END FROM WidgetInst WHERE WidgetInstId = 16654) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17438;


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 = 16655) END FROM WidgetInst WHERE WidgetInstId = 16655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17439;


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 = 16656) END FROM WidgetInst WHERE WidgetInstId = 16656) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17440;


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 = 16657) END FROM WidgetInst WHERE WidgetInstId = 16657) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17450) END FROM WidgetInst WHERE WidgetInstId = 17450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17451) END FROM WidgetInst WHERE WidgetInstId = 17451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17452) END FROM WidgetInst WHERE WidgetInstId = 17452) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17453) END FROM WidgetInst WHERE WidgetInstId = 17453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17457;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17450) END FROM WidgetInst WHERE WidgetInstId = 17450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17451) END FROM WidgetInst WHERE WidgetInstId = 17451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17452) END FROM WidgetInst WHERE WidgetInstId = 17452) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17453) END FROM WidgetInst WHERE WidgetInstId = 17453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17469;


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 = 17450) END FROM WidgetInst WHERE WidgetInstId = 17450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17478;


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 = 17451) END FROM WidgetInst WHERE WidgetInstId = 17451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17479;


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 = 17452) END FROM WidgetInst WHERE WidgetInstId = 17452) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17480;


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 = 17453) END FROM WidgetInst WHERE WidgetInstId = 17453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17450) END FROM WidgetInst WHERE WidgetInstId = 17450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17451) END FROM WidgetInst WHERE WidgetInstId = 17451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17452) END FROM WidgetInst WHERE WidgetInstId = 17452) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17453) END FROM WidgetInst WHERE WidgetInstId = 17453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17525;


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 = 17538) END FROM WidgetInst WHERE WidgetInstId = 17538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17542;


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 = 17539) END FROM WidgetInst WHERE WidgetInstId = 17539) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17543;


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 = 17540) END FROM WidgetInst WHERE WidgetInstId = 17540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17544;


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 = 17541) END FROM WidgetInst WHERE WidgetInstId = 17541) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17538) END FROM WidgetInst WHERE WidgetInstId = 17538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17539) END FROM WidgetInst WHERE WidgetInstId = 17539) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17540) END FROM WidgetInst WHERE WidgetInstId = 17540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17541) END FROM WidgetInst WHERE WidgetInstId = 17541) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17538) END FROM WidgetInst WHERE WidgetInstId = 17538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17539) END FROM WidgetInst WHERE WidgetInstId = 17539) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17540) END FROM WidgetInst WHERE WidgetInstId = 17540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17541) END FROM WidgetInst WHERE WidgetInstId = 17541) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17538) END FROM WidgetInst WHERE WidgetInstId = 17538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17539) END FROM WidgetInst WHERE WidgetInstId = 17539) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17540) END FROM WidgetInst WHERE WidgetInstId = 17540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17541) END FROM WidgetInst WHERE WidgetInstId = 17541) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17538) END FROM WidgetInst WHERE WidgetInstId = 17538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17539) END FROM WidgetInst WHERE WidgetInstId = 17539) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17540) END FROM WidgetInst WHERE WidgetInstId = 17540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17541) END FROM WidgetInst WHERE WidgetInstId = 17541) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17538) END FROM WidgetInst WHERE WidgetInstId = 17538) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17539) END FROM WidgetInst WHERE WidgetInstId = 17539) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17540) END FROM WidgetInst WHERE WidgetInstId = 17540) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17541) END FROM WidgetInst WHERE WidgetInstId = 17541) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17585;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 16654) END FROM WidgetInst WHERE WidgetInstId = 16654) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 16265) END FROM WidgetInst WHERE WidgetInstId = 16265)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17590;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 16655) END FROM WidgetInst WHERE WidgetInstId = 16655) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 16265) END FROM WidgetInst WHERE WidgetInstId = 16265)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17591;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 16656) END FROM WidgetInst WHERE WidgetInstId = 16656) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 16265) END FROM WidgetInst WHERE WidgetInstId = 16265)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17592;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 16657) END FROM WidgetInst WHERE WidgetInstId = 16657) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 16265) END FROM WidgetInst WHERE WidgetInstId = 16265)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17593;


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 = 17598) END FROM WidgetInst WHERE WidgetInstId = 17598) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17602;


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 = 17599) END FROM WidgetInst WHERE WidgetInstId = 17599) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17603;


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 = 17600) END FROM WidgetInst WHERE WidgetInstId = 17600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17604;


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 = 17601) END FROM WidgetInst WHERE WidgetInstId = 17601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17605;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 17612;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 17612;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 17612;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 17612;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 17612;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 17612;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17613;


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 = 17615) END FROM WidgetInst WHERE WidgetInstId = 17615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17616;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17618;


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 = 16262) END FROM WidgetInst WHERE WidgetInstId = 16262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17624;


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 = 16262) END FROM WidgetInst WHERE WidgetInstId = 16262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17627;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17632) END FROM WidgetInst WHERE WidgetInstId = 17632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17632) END FROM WidgetInst WHERE WidgetInstId = 17632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17636;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17641) END FROM WidgetInst WHERE WidgetInstId = 17641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17641) END FROM WidgetInst WHERE WidgetInstId = 17641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17641) END FROM WidgetInst WHERE WidgetInstId = 17641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17648;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17651;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17653) END FROM WidgetInst WHERE WidgetInstId = 17653)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17655) END FROM WidgetInst WHERE WidgetInstId = 17655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17655) END FROM WidgetInst WHERE WidgetInstId = 17655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17655) END FROM WidgetInst WHERE WidgetInstId = 17655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17655) END FROM WidgetInst WHERE WidgetInstId = 17655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17664;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17653) END FROM WidgetInst WHERE WidgetInstId = 17653)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17655) END FROM WidgetInst WHERE WidgetInstId = 17655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17655) END FROM WidgetInst WHERE WidgetInstId = 17655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17671) END FROM WidgetInst WHERE WidgetInstId = 17671) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17672;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17655) END FROM WidgetInst WHERE WidgetInstId = 17655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17674;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17655) END FROM WidgetInst WHERE WidgetInstId = 17655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17671) END FROM WidgetInst WHERE WidgetInstId = 17671) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17655) END FROM WidgetInst WHERE WidgetInstId = 17655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17655) END FROM WidgetInst WHERE WidgetInstId = 17655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17679;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17680;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17716) END FROM WidgetInst WHERE WidgetInstId = 17716) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17716) END FROM WidgetInst WHERE WidgetInstId = 17716) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17716) END FROM WidgetInst WHERE WidgetInstId = 17716) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17721;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17732) END FROM WidgetInst WHERE WidgetInstId = 17732) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17732) END FROM WidgetInst WHERE WidgetInstId = 17732) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17732) END FROM WidgetInst WHERE WidgetInstId = 17732) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17737;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17739;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17752) END FROM WidgetInst WHERE WidgetInstId = 17752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17752) END FROM WidgetInst WHERE WidgetInstId = 17752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17752) END FROM WidgetInst WHERE WidgetInstId = 17752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17757;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17759;


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 = 17772) END FROM WidgetInst WHERE WidgetInstId = 17772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17773;


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 = 17772) END FROM WidgetInst WHERE WidgetInstId = 17772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17775;


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 = 17772) END FROM WidgetInst WHERE WidgetInstId = 17772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17777;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 17778) END FROM WidgetInst WHERE WidgetInstId = 17778) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17772) END FROM WidgetInst WHERE WidgetInstId = 17772)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17779;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 17778) END FROM WidgetInst WHERE WidgetInstId = 17778) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17772) END FROM WidgetInst WHERE WidgetInstId = 17772)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17781;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 17778) END FROM WidgetInst WHERE WidgetInstId = 17778) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17772) END FROM WidgetInst WHERE WidgetInstId = 17772)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17783;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17787) END FROM WidgetInst WHERE WidgetInstId = 17787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17787) END FROM WidgetInst WHERE WidgetInstId = 17787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17791;


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 = 17787) END FROM WidgetInst WHERE WidgetInstId = 17787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17787) END FROM WidgetInst WHERE WidgetInstId = 17787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17805;


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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17815;


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 = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17829;


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 = 17833) END FROM WidgetInst WHERE WidgetInstId = 17833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17833) END FROM WidgetInst WHERE WidgetInstId = 17833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17833) END FROM WidgetInst WHERE WidgetInstId = 17833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17833) END FROM WidgetInst WHERE WidgetInstId = 17833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17833) END FROM WidgetInst WHERE WidgetInstId = 17833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17833) END FROM WidgetInst WHERE WidgetInstId = 17833) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17844;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 17612) END FROM WidgetInst WHERE WidgetInstId = 17612) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 16265) END FROM WidgetInst WHERE WidgetInstId = 16265)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17846;


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 = 17848) END FROM WidgetInst WHERE WidgetInstId = 17848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17849;


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 = 17879) END FROM WidgetInst WHERE WidgetInstId = 17879) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17880;


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 = 17879) END FROM WidgetInst WHERE WidgetInstId = 17879) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17882;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17888;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17896;


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 = 17892) END FROM WidgetInst WHERE WidgetInstId = 17892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17898;


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 = 17894) END FROM WidgetInst WHERE WidgetInstId = 17894) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17900;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17902;


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 = 17892) END FROM WidgetInst WHERE WidgetInstId = 17892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17904;


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 = 17894) END FROM WidgetInst WHERE WidgetInstId = 17894) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17906;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17908;


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 = 17892) END FROM WidgetInst WHERE WidgetInstId = 17892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17910;


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 = 17894) END FROM WidgetInst WHERE WidgetInstId = 17894) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17912;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17914;


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 = 17892) END FROM WidgetInst WHERE WidgetInstId = 17892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17916;


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 = 17894) END FROM WidgetInst WHERE WidgetInstId = 17894) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17918;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17920;


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 = 17892) END FROM WidgetInst WHERE WidgetInstId = 17892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17922;


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 = 17894) END FROM WidgetInst WHERE WidgetInstId = 17894) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17924;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17926;


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 = 17892) END FROM WidgetInst WHERE WidgetInstId = 17892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17928;


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 = 17894) END FROM WidgetInst WHERE WidgetInstId = 17894) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17930;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17932;


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 = 17892) END FROM WidgetInst WHERE WidgetInstId = 17892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17934;


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 = 17894) END FROM WidgetInst WHERE WidgetInstId = 17894) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17936;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17938;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17940;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17942;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17944;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17946;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17948;


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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17950;


Query:
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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17952;


Query:
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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17954;


Query:
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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17956;


Query:
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 = 17887) END FROM WidgetInst WHERE WidgetInstId = 17887) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17958;


Query:
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 = 17971) END FROM WidgetInst WHERE WidgetInstId = 17971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17972;


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 = 17981) END FROM WidgetInst WHERE WidgetInstId = 17981) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17982;


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 = 17984) END FROM WidgetInst WHERE WidgetInstId = 17984) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17985;


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 = 17989) END FROM WidgetInst WHERE WidgetInstId = 17989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17990;


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 = 17989) END FROM WidgetInst WHERE WidgetInstId = 17989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17992;


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 = 17981) END FROM WidgetInst WHERE WidgetInstId = 17981) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18007;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18021;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18021;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18021;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18021;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18021;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18021;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18022;


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 = 18024) END FROM WidgetInst WHERE WidgetInstId = 18024) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18025;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18027;


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 = 14648) END FROM WidgetInst WHERE WidgetInstId = 14648) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18033;


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 = 14648) END FROM WidgetInst WHERE WidgetInstId = 14648) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18036;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18041) END FROM WidgetInst WHERE WidgetInstId = 18041) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18041) END FROM WidgetInst WHERE WidgetInstId = 18041) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18045;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18050) END FROM WidgetInst WHERE WidgetInstId = 18050) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18050) END FROM WidgetInst WHERE WidgetInstId = 18050) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18050) END FROM WidgetInst WHERE WidgetInstId = 18050) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18057;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18060;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18062) END FROM WidgetInst WHERE WidgetInstId = 18062)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18064) END FROM WidgetInst WHERE WidgetInstId = 18064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18064) END FROM WidgetInst WHERE WidgetInstId = 18064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18064) END FROM WidgetInst WHERE WidgetInstId = 18064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18064) END FROM WidgetInst WHERE WidgetInstId = 18064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18073;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18062) END FROM WidgetInst WHERE WidgetInstId = 18062)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18064) END FROM WidgetInst WHERE WidgetInstId = 18064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18064) END FROM WidgetInst WHERE WidgetInstId = 18064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18080) END FROM WidgetInst WHERE WidgetInstId = 18080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18081;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18064) END FROM WidgetInst WHERE WidgetInstId = 18064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18064) END FROM WidgetInst WHERE WidgetInstId = 18064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18080) END FROM WidgetInst WHERE WidgetInstId = 18080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18064) END FROM WidgetInst WHERE WidgetInstId = 18064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18087;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18064) END FROM WidgetInst WHERE WidgetInstId = 18064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18088;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18089;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18125) END FROM WidgetInst WHERE WidgetInstId = 18125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18125) END FROM WidgetInst WHERE WidgetInstId = 18125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18128;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18125) END FROM WidgetInst WHERE WidgetInstId = 18125) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18130;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18141) END FROM WidgetInst WHERE WidgetInstId = 18141) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18141) END FROM WidgetInst WHERE WidgetInstId = 18141) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18141) END FROM WidgetInst WHERE WidgetInstId = 18141) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18146;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18161) END FROM WidgetInst WHERE WidgetInstId = 18161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18161) END FROM WidgetInst WHERE WidgetInstId = 18161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18161) END FROM WidgetInst WHERE WidgetInstId = 18161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18166;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18168;


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 = 18181) END FROM WidgetInst WHERE WidgetInstId = 18181) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18182;


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 = 18181) END FROM WidgetInst WHERE WidgetInstId = 18181) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18184;


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 = 18181) END FROM WidgetInst WHERE WidgetInstId = 18181) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18186;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18187) END FROM WidgetInst WHERE WidgetInstId = 18187) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18181) END FROM WidgetInst WHERE WidgetInstId = 18181)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18188;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18187) END FROM WidgetInst WHERE WidgetInstId = 18187) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18181) END FROM WidgetInst WHERE WidgetInstId = 18181)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18190;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18187) END FROM WidgetInst WHERE WidgetInstId = 18187) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18181) END FROM WidgetInst WHERE WidgetInstId = 18181)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18192;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18196) END FROM WidgetInst WHERE WidgetInstId = 18196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18196) END FROM WidgetInst WHERE WidgetInstId = 18196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18200;


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 = 18196) END FROM WidgetInst WHERE WidgetInstId = 18196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18196) END FROM WidgetInst WHERE WidgetInstId = 18196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18214;


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 = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18220) END FROM WidgetInst WHERE WidgetInstId = 18220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18220) END FROM WidgetInst WHERE WidgetInstId = 18220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18224;


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 = 18220) END FROM WidgetInst WHERE WidgetInstId = 18220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18227;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18220) END FROM WidgetInst WHERE WidgetInstId = 18220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18238;


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 = 18242) END FROM WidgetInst WHERE WidgetInstId = 18242) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18242) END FROM WidgetInst WHERE WidgetInstId = 18242) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18242) END FROM WidgetInst WHERE WidgetInstId = 18242) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18242) END FROM WidgetInst WHERE WidgetInstId = 18242) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18242) END FROM WidgetInst WHERE WidgetInstId = 18242) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18242) END FROM WidgetInst WHERE WidgetInstId = 18242) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18253;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 14793) END FROM WidgetInst WHERE WidgetInstId = 14793) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 14651) END FROM WidgetInst WHERE WidgetInstId = 14651)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18255;


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 = 18257) END FROM WidgetInst WHERE WidgetInstId = 18257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18258;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18268;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18268;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18268;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18268;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18268;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18268;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18269;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18269;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18269;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18269;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18269;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18269;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18270;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18270;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18270;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18270;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18270;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18270;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18271;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18271;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18271;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18271;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18271;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 18271;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18272;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18273;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18274;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18275;


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 = 18280) END FROM WidgetInst WHERE WidgetInstId = 18280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18284;


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 = 18281) END FROM WidgetInst WHERE WidgetInstId = 18281) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18285;


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 = 18282) END FROM WidgetInst WHERE WidgetInstId = 18282) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18286;


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 = 18283) END FROM WidgetInst WHERE WidgetInstId = 18283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18287;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18292;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18293;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18294;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18295;


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 = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18316;


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 = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18317;


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 = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18318;


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 = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18319;


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 = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18328;


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 = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18329;


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 = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18330;


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 = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18331;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18340;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18341;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18342;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18348) END FROM WidgetInst WHERE WidgetInstId = 18348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18349) END FROM WidgetInst WHERE WidgetInstId = 18349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18350) END FROM WidgetInst WHERE WidgetInstId = 18350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18354;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18351) END FROM WidgetInst WHERE WidgetInstId = 18351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18355;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18348) END FROM WidgetInst WHERE WidgetInstId = 18348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18349) END FROM WidgetInst WHERE WidgetInstId = 18349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18350) END FROM WidgetInst WHERE WidgetInstId = 18350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18351) END FROM WidgetInst WHERE WidgetInstId = 18351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18367;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18376;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18377;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18378;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18384) END FROM WidgetInst WHERE WidgetInstId = 18384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18385) END FROM WidgetInst WHERE WidgetInstId = 18385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18386) END FROM WidgetInst WHERE WidgetInstId = 18386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18387) END FROM WidgetInst WHERE WidgetInstId = 18387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18384) END FROM WidgetInst WHERE WidgetInstId = 18384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18385) END FROM WidgetInst WHERE WidgetInstId = 18385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18386) END FROM WidgetInst WHERE WidgetInstId = 18386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18387) END FROM WidgetInst WHERE WidgetInstId = 18387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18384) END FROM WidgetInst WHERE WidgetInstId = 18384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18385) END FROM WidgetInst WHERE WidgetInstId = 18385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18386) END FROM WidgetInst WHERE WidgetInstId = 18386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18387) END FROM WidgetInst WHERE WidgetInstId = 18387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18415;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18424;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18425;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18426;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18427;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18432) END FROM WidgetInst WHERE WidgetInstId = 18432)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18444;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18433) END FROM WidgetInst WHERE WidgetInstId = 18433)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18445;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18434) END FROM WidgetInst WHERE WidgetInstId = 18434)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18446;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18435) END FROM WidgetInst WHERE WidgetInstId = 18435)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18440) END FROM WidgetInst WHERE WidgetInstId = 18440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18441) END FROM WidgetInst WHERE WidgetInstId = 18441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18457;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18442) END FROM WidgetInst WHERE WidgetInstId = 18442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18443) END FROM WidgetInst WHERE WidgetInstId = 18443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18440) END FROM WidgetInst WHERE WidgetInstId = 18440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18441) END FROM WidgetInst WHERE WidgetInstId = 18441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18442) END FROM WidgetInst WHERE WidgetInstId = 18442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18443) END FROM WidgetInst WHERE WidgetInstId = 18443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18440) END FROM WidgetInst WHERE WidgetInstId = 18440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18441) END FROM WidgetInst WHERE WidgetInstId = 18441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18442) END FROM WidgetInst WHERE WidgetInstId = 18442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18443) END FROM WidgetInst WHERE WidgetInstId = 18443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18440) END FROM WidgetInst WHERE WidgetInstId = 18440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18441) END FROM WidgetInst WHERE WidgetInstId = 18441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18442) END FROM WidgetInst WHERE WidgetInstId = 18442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18443) END FROM WidgetInst WHERE WidgetInstId = 18443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18479;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18432) END FROM WidgetInst WHERE WidgetInstId = 18432)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18480;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18433) END FROM WidgetInst WHERE WidgetInstId = 18433)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18481;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18434) END FROM WidgetInst WHERE WidgetInstId = 18434)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18482;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18435) END FROM WidgetInst WHERE WidgetInstId = 18435)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18440) END FROM WidgetInst WHERE WidgetInstId = 18440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18441) END FROM WidgetInst WHERE WidgetInstId = 18441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18442) END FROM WidgetInst WHERE WidgetInstId = 18442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18494;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18443) END FROM WidgetInst WHERE WidgetInstId = 18443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18440) END FROM WidgetInst WHERE WidgetInstId = 18440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18496;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18441) END FROM WidgetInst WHERE WidgetInstId = 18441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18497;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18442) END FROM WidgetInst WHERE WidgetInstId = 18442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18443) END FROM WidgetInst WHERE WidgetInstId = 18443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18504) END FROM WidgetInst WHERE WidgetInstId = 18504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18505) END FROM WidgetInst WHERE WidgetInstId = 18505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18506) END FROM WidgetInst WHERE WidgetInstId = 18506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18507) END FROM WidgetInst WHERE WidgetInstId = 18507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18440) END FROM WidgetInst WHERE WidgetInstId = 18440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18441) END FROM WidgetInst WHERE WidgetInstId = 18441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18442) END FROM WidgetInst WHERE WidgetInstId = 18442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18443) END FROM WidgetInst WHERE WidgetInstId = 18443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18440) END FROM WidgetInst WHERE WidgetInstId = 18440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18441) END FROM WidgetInst WHERE WidgetInstId = 18441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18442) END FROM WidgetInst WHERE WidgetInstId = 18442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18443) END FROM WidgetInst WHERE WidgetInstId = 18443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18504) END FROM WidgetInst WHERE WidgetInstId = 18504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18505) END FROM WidgetInst WHERE WidgetInstId = 18505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18506) END FROM WidgetInst WHERE WidgetInstId = 18506) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18507) END FROM WidgetInst WHERE WidgetInstId = 18507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18440) END FROM WidgetInst WHERE WidgetInstId = 18440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18441) END FROM WidgetInst WHERE WidgetInstId = 18441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18442) END FROM WidgetInst WHERE WidgetInstId = 18442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18443) END FROM WidgetInst WHERE WidgetInstId = 18443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18440) END FROM WidgetInst WHERE WidgetInstId = 18440) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18441) END FROM WidgetInst WHERE WidgetInstId = 18441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18442) END FROM WidgetInst WHERE WidgetInstId = 18442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18443) END FROM WidgetInst WHERE WidgetInstId = 18443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18539;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18540;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18541;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18542;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18543;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18552;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18553;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18554;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18684) END FROM WidgetInst WHERE WidgetInstId = 18684) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18688;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18685) END FROM WidgetInst WHERE WidgetInstId = 18685) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18686) END FROM WidgetInst WHERE WidgetInstId = 18686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18690;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18687) END FROM WidgetInst WHERE WidgetInstId = 18687) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18684) END FROM WidgetInst WHERE WidgetInstId = 18684) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18685) END FROM WidgetInst WHERE WidgetInstId = 18685) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18686) END FROM WidgetInst WHERE WidgetInstId = 18686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18687) END FROM WidgetInst WHERE WidgetInstId = 18687) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18684) END FROM WidgetInst WHERE WidgetInstId = 18684) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18685) END FROM WidgetInst WHERE WidgetInstId = 18685) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18686) END FROM WidgetInst WHERE WidgetInstId = 18686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18687) END FROM WidgetInst WHERE WidgetInstId = 18687) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18707;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18712;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18713;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18714;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18748) END FROM WidgetInst WHERE WidgetInstId = 18748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18749) END FROM WidgetInst WHERE WidgetInstId = 18749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18750) END FROM WidgetInst WHERE WidgetInstId = 18750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18751) END FROM WidgetInst WHERE WidgetInstId = 18751) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18748) END FROM WidgetInst WHERE WidgetInstId = 18748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18749) END FROM WidgetInst WHERE WidgetInstId = 18749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18750) END FROM WidgetInst WHERE WidgetInstId = 18750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18751) END FROM WidgetInst WHERE WidgetInstId = 18751) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18748) END FROM WidgetInst WHERE WidgetInstId = 18748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18749) END FROM WidgetInst WHERE WidgetInstId = 18749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18750) END FROM WidgetInst WHERE WidgetInstId = 18750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18751) END FROM WidgetInst WHERE WidgetInstId = 18751) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18771;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18776;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18777;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18778;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18828) END FROM WidgetInst WHERE WidgetInstId = 18828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18829) END FROM WidgetInst WHERE WidgetInstId = 18829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18830) END FROM WidgetInst WHERE WidgetInstId = 18830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18831) END FROM WidgetInst WHERE WidgetInstId = 18831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18828) END FROM WidgetInst WHERE WidgetInstId = 18828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18829) END FROM WidgetInst WHERE WidgetInstId = 18829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18830) END FROM WidgetInst WHERE WidgetInstId = 18830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18831) END FROM WidgetInst WHERE WidgetInstId = 18831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18828) END FROM WidgetInst WHERE WidgetInstId = 18828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18829) END FROM WidgetInst WHERE WidgetInstId = 18829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18830) END FROM WidgetInst WHERE WidgetInstId = 18830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18831) END FROM WidgetInst WHERE WidgetInstId = 18831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18851;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18856;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18857;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18858;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18859;


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 = 18908) END FROM WidgetInst WHERE WidgetInstId = 18908) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18912;


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 = 18909) END FROM WidgetInst WHERE WidgetInstId = 18909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18913;


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 = 18910) END FROM WidgetInst WHERE WidgetInstId = 18910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18914;


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 = 18911) END FROM WidgetInst WHERE WidgetInstId = 18911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18915;


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 = 18908) END FROM WidgetInst WHERE WidgetInstId = 18908) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18920;


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 = 18909) END FROM WidgetInst WHERE WidgetInstId = 18909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18921;


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 = 18910) END FROM WidgetInst WHERE WidgetInstId = 18910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18922;


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 = 18911) END FROM WidgetInst WHERE WidgetInstId = 18911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18923;


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 = 18908) END FROM WidgetInst WHERE WidgetInstId = 18908) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18928;


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 = 18909) END FROM WidgetInst WHERE WidgetInstId = 18909) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18929;


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 = 18910) END FROM WidgetInst WHERE WidgetInstId = 18910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18930;


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 = 18911) END FROM WidgetInst WHERE WidgetInstId = 18911) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18931;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18932) END FROM WidgetInst WHERE WidgetInstId = 18932) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18908) END FROM WidgetInst WHERE WidgetInstId = 18908)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18936;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18933) END FROM WidgetInst WHERE WidgetInstId = 18933) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18909) END FROM WidgetInst WHERE WidgetInstId = 18909)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18937;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18934) END FROM WidgetInst WHERE WidgetInstId = 18934) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18910) END FROM WidgetInst WHERE WidgetInstId = 18910)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18938;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18935) END FROM WidgetInst WHERE WidgetInstId = 18935) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18911) END FROM WidgetInst WHERE WidgetInstId = 18911)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18939;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18932) END FROM WidgetInst WHERE WidgetInstId = 18932) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18908) END FROM WidgetInst WHERE WidgetInstId = 18908)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18944;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18933) END FROM WidgetInst WHERE WidgetInstId = 18933) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18909) END FROM WidgetInst WHERE WidgetInstId = 18909)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18945;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18934) END FROM WidgetInst WHERE WidgetInstId = 18934) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18910) END FROM WidgetInst WHERE WidgetInstId = 18910)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18946;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18935) END FROM WidgetInst WHERE WidgetInstId = 18935) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18911) END FROM WidgetInst WHERE WidgetInstId = 18911)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18947;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18932) END FROM WidgetInst WHERE WidgetInstId = 18932) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18908) END FROM WidgetInst WHERE WidgetInstId = 18908)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18952;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18933) END FROM WidgetInst WHERE WidgetInstId = 18933) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18909) END FROM WidgetInst WHERE WidgetInstId = 18909)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18953;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18934) END FROM WidgetInst WHERE WidgetInstId = 18934) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18910) END FROM WidgetInst WHERE WidgetInstId = 18910)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18954;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 18935) END FROM WidgetInst WHERE WidgetInstId = 18935) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18911) END FROM WidgetInst WHERE WidgetInstId = 18911)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18955;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18960;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18961;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18962;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18968) END FROM WidgetInst WHERE WidgetInstId = 18968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18969) END FROM WidgetInst WHERE WidgetInstId = 18969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18970) END FROM WidgetInst WHERE WidgetInstId = 18970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18971) END FROM WidgetInst WHERE WidgetInstId = 18971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18968) END FROM WidgetInst WHERE WidgetInstId = 18968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18984;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18969) END FROM WidgetInst WHERE WidgetInstId = 18969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18970) END FROM WidgetInst WHERE WidgetInstId = 18970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18971) END FROM WidgetInst WHERE WidgetInstId = 18971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18987;


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 = 18968) END FROM WidgetInst WHERE WidgetInstId = 18968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18996;


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 = 18969) END FROM WidgetInst WHERE WidgetInstId = 18969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18997;


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 = 18970) END FROM WidgetInst WHERE WidgetInstId = 18970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18998;


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 = 18971) END FROM WidgetInst WHERE WidgetInstId = 18971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18968) END FROM WidgetInst WHERE WidgetInstId = 18968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18969) END FROM WidgetInst WHERE WidgetInstId = 18969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18970) END FROM WidgetInst WHERE WidgetInstId = 18970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18971) END FROM WidgetInst WHERE WidgetInstId = 18971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19043;


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 = 18268) END FROM WidgetInst WHERE WidgetInstId = 18268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19052;


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 = 18269) END FROM WidgetInst WHERE WidgetInstId = 18269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19053;


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 = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19054;


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 = 18271) END FROM WidgetInst WHERE WidgetInstId = 18271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19064) END FROM WidgetInst WHERE WidgetInstId = 19064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19065) END FROM WidgetInst WHERE WidgetInstId = 19065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19066) END FROM WidgetInst WHERE WidgetInstId = 19066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19067) END FROM WidgetInst WHERE WidgetInstId = 19067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19064) END FROM WidgetInst WHERE WidgetInstId = 19064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19065) END FROM WidgetInst WHERE WidgetInstId = 19065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19081;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19066) END FROM WidgetInst WHERE WidgetInstId = 19066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19067) END FROM WidgetInst WHERE WidgetInstId = 19067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19083;


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 = 19064) END FROM WidgetInst WHERE WidgetInstId = 19064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19092;


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 = 19065) END FROM WidgetInst WHERE WidgetInstId = 19065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19093;


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 = 19066) END FROM WidgetInst WHERE WidgetInstId = 19066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19094;


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 = 19067) END FROM WidgetInst WHERE WidgetInstId = 19067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19095;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19064) END FROM WidgetInst WHERE WidgetInstId = 19064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19136;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19065) END FROM WidgetInst WHERE WidgetInstId = 19065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19137;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19066) END FROM WidgetInst WHERE WidgetInstId = 19066) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19067) END FROM WidgetInst WHERE WidgetInstId = 19067) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19139;


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 = 19152) END FROM WidgetInst WHERE WidgetInstId = 19152) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19156;


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 = 19153) END FROM WidgetInst WHERE WidgetInstId = 19153) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19157;


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 = 19154) END FROM WidgetInst WHERE WidgetInstId = 19154) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19158;


