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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13267;


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 = 13263) END FROM WidgetInst WHERE WidgetInstId = 13263) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13268;


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 = 13264) END FROM WidgetInst WHERE WidgetInstId = 13264) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13263) END FROM WidgetInst WHERE WidgetInstId = 13263) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13264) END FROM WidgetInst WHERE WidgetInstId = 13264) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13263) END FROM WidgetInst WHERE WidgetInstId = 13263) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13288;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13264) END FROM WidgetInst WHERE WidgetInstId = 13264) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13263) END FROM WidgetInst WHERE WidgetInstId = 13263) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13264) END FROM WidgetInst WHERE WidgetInstId = 13264) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13263) END FROM WidgetInst WHERE WidgetInstId = 13263) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13308;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13264) END FROM WidgetInst WHERE WidgetInstId = 13264) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13262) END FROM WidgetInst WHERE WidgetInstId = 13262) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13263) END FROM WidgetInst WHERE WidgetInstId = 13263) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13264) END FROM WidgetInst WHERE WidgetInstId = 13264) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13319;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 12157) END FROM WidgetInst WHERE WidgetInstId = 12157) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 11766) END FROM WidgetInst WHERE WidgetInstId = 11766)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13327;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 12158) END FROM WidgetInst WHERE WidgetInstId = 12158) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 11766) END FROM WidgetInst WHERE WidgetInstId = 11766)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13328;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 12159) END FROM WidgetInst WHERE WidgetInstId = 12159) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 11766) END FROM WidgetInst WHERE WidgetInstId = 11766)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13329;


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 = 13337) END FROM WidgetInst WHERE WidgetInstId = 13337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13342;


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 = 13338) END FROM WidgetInst WHERE WidgetInstId = 13338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13343;


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 = 13339) END FROM WidgetInst WHERE WidgetInstId = 13339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13344;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 308)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 13354;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 308)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 13354;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 308)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 13354;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 308)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 13354;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 308)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 13354;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 308)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 13354;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13355;


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 = 13357) END FROM WidgetInst WHERE WidgetInstId = 13357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13358;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13360;


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 = 11763) END FROM WidgetInst WHERE WidgetInstId = 11763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13366;


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 = 11763) END FROM WidgetInst WHERE WidgetInstId = 11763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13369;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13374) END FROM WidgetInst WHERE WidgetInstId = 13374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13374) END FROM WidgetInst WHERE WidgetInstId = 13374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13378;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13383) END FROM WidgetInst WHERE WidgetInstId = 13383) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13383) END FROM WidgetInst WHERE WidgetInstId = 13383) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 13383) END FROM WidgetInst WHERE WidgetInstId = 13383) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13390;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13393;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13395) END FROM WidgetInst WHERE WidgetInstId = 13395)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13397) END FROM WidgetInst WHERE WidgetInstId = 13397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13397) END FROM WidgetInst WHERE WidgetInstId = 13397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13397) END FROM WidgetInst WHERE WidgetInstId = 13397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13397) END FROM WidgetInst WHERE WidgetInstId = 13397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13406;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13395) END FROM WidgetInst WHERE WidgetInstId = 13395)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13397) END FROM WidgetInst WHERE WidgetInstId = 13397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13397) END FROM WidgetInst WHERE WidgetInstId = 13397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13413) END FROM WidgetInst WHERE WidgetInstId = 13413) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13397) END FROM WidgetInst WHERE WidgetInstId = 13397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13397) END FROM WidgetInst WHERE WidgetInstId = 13397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 13413) END FROM WidgetInst WHERE WidgetInstId = 13413) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13397) END FROM WidgetInst WHERE WidgetInstId = 13397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13397) END FROM WidgetInst WHERE WidgetInstId = 13397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13421;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13422;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13458) END FROM WidgetInst WHERE WidgetInstId = 13458) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13458) END FROM WidgetInst WHERE WidgetInstId = 13458) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13458) END FROM WidgetInst WHERE WidgetInstId = 13458) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13463;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13474) END FROM WidgetInst WHERE WidgetInstId = 13474) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13474) END FROM WidgetInst WHERE WidgetInstId = 13474) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13474) END FROM WidgetInst WHERE WidgetInstId = 13474) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13479;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13494) END FROM WidgetInst WHERE WidgetInstId = 13494) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13494) END FROM WidgetInst WHERE WidgetInstId = 13494) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13497;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13494) END FROM WidgetInst WHERE WidgetInstId = 13494) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13499;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13501;


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 = 13514) END FROM WidgetInst WHERE WidgetInstId = 13514) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13515;


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 = 13514) END FROM WidgetInst WHERE WidgetInstId = 13514) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13517;


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 = 13514) END FROM WidgetInst WHERE WidgetInstId = 13514) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13519;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13520) END FROM WidgetInst WHERE WidgetInstId = 13520) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13514) END FROM WidgetInst WHERE WidgetInstId = 13514)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13521;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13520) END FROM WidgetInst WHERE WidgetInstId = 13520) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13514) END FROM WidgetInst WHERE WidgetInstId = 13514)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13523;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13520) END FROM WidgetInst WHERE WidgetInstId = 13520) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13514) END FROM WidgetInst WHERE WidgetInstId = 13514)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13525;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13529) END FROM WidgetInst WHERE WidgetInstId = 13529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13529) END FROM WidgetInst WHERE WidgetInstId = 13529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13533;


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 = 13529) END FROM WidgetInst WHERE WidgetInstId = 13529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13529) END FROM WidgetInst WHERE WidgetInstId = 13529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13547;


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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13553) END FROM WidgetInst WHERE WidgetInstId = 13553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13553) END FROM WidgetInst WHERE WidgetInstId = 13553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13557;


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 = 13553) END FROM WidgetInst WHERE WidgetInstId = 13553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13553) END FROM WidgetInst WHERE WidgetInstId = 13553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13571;


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 = 13575) END FROM WidgetInst WHERE WidgetInstId = 13575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13575) END FROM WidgetInst WHERE WidgetInstId = 13575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13575) END FROM WidgetInst WHERE WidgetInstId = 13575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13575) END FROM WidgetInst WHERE WidgetInstId = 13575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13575) END FROM WidgetInst WHERE WidgetInstId = 13575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13575) END FROM WidgetInst WHERE WidgetInstId = 13575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13586;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13354) END FROM WidgetInst WHERE WidgetInstId = 13354) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 11766) END FROM WidgetInst WHERE WidgetInstId = 11766)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13588;


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 = 13590) END FROM WidgetInst WHERE WidgetInstId = 13590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 13631) END FROM WidgetInst WHERE WidgetInstId = 13631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 13631) END FROM WidgetInst WHERE WidgetInstId = 13631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 13639) END FROM WidgetInst WHERE WidgetInstId = 13639) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 13648) END FROM WidgetInst WHERE WidgetInstId = 13648) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 13648) END FROM WidgetInst WHERE WidgetInstId = 13648) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 13670) END FROM WidgetInst WHERE WidgetInstId = 13670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 13670) END FROM WidgetInst WHERE WidgetInstId = 13670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 13678) END FROM WidgetInst WHERE WidgetInstId = 13678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 13687) END FROM WidgetInst WHERE WidgetInstId = 13687) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13688;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 13687) END FROM WidgetInst WHERE WidgetInstId = 13687) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13690;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 13709) END FROM WidgetInst WHERE WidgetInstId = 13709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13710;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 13709) END FROM WidgetInst WHERE WidgetInstId = 13709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13712;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 13717) END FROM WidgetInst WHERE WidgetInstId = 13717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 13726) END FROM WidgetInst WHERE WidgetInstId = 13726) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 13726) END FROM WidgetInst WHERE WidgetInstId = 13726) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 13757) END FROM WidgetInst WHERE WidgetInstId = 13757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 13757) END FROM WidgetInst WHERE WidgetInstId = 13757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 13765) END FROM WidgetInst WHERE WidgetInstId = 13765) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 13774) END FROM WidgetInst WHERE WidgetInstId = 13774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 13774) END FROM WidgetInst WHERE WidgetInstId = 13774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 13796) END FROM WidgetInst WHERE WidgetInstId = 13796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 13796) END FROM WidgetInst WHERE WidgetInstId = 13796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 13804) END FROM WidgetInst WHERE WidgetInstId = 13804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 13813) END FROM WidgetInst WHERE WidgetInstId = 13813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 13813) END FROM WidgetInst WHERE WidgetInstId = 13813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 13835) END FROM WidgetInst WHERE WidgetInstId = 13835) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 13835) END FROM WidgetInst WHERE WidgetInstId = 13835) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 13843) END FROM WidgetInst WHERE WidgetInstId = 13843) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13844;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 13852) END FROM WidgetInst WHERE WidgetInstId = 13852) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 13852) END FROM WidgetInst WHERE WidgetInstId = 13852) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 13874) END FROM WidgetInst WHERE WidgetInstId = 13874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 13874) END FROM WidgetInst WHERE WidgetInstId = 13874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 13882) END FROM WidgetInst WHERE WidgetInstId = 13882) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 13891) END FROM WidgetInst WHERE WidgetInstId = 13891) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 13891) END FROM WidgetInst WHERE WidgetInstId = 13891) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 13913) END FROM WidgetInst WHERE WidgetInstId = 13913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 13913) END FROM WidgetInst WHERE WidgetInstId = 13913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13916;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 13921) END FROM WidgetInst WHERE WidgetInstId = 13921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 13930) END FROM WidgetInst WHERE WidgetInstId = 13930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 13930) END FROM WidgetInst WHERE WidgetInstId = 13930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 13952) END FROM WidgetInst WHERE WidgetInstId = 13952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 13952) END FROM WidgetInst WHERE WidgetInstId = 13952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 13960) END FROM WidgetInst WHERE WidgetInstId = 13960) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13961;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 13969) END FROM WidgetInst WHERE WidgetInstId = 13969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13970;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 13969) END FROM WidgetInst WHERE WidgetInstId = 13969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 13991) END FROM WidgetInst WHERE WidgetInstId = 13991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 13991) END FROM WidgetInst WHERE WidgetInstId = 13991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 13999) END FROM WidgetInst WHERE WidgetInstId = 13999) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 14008) END FROM WidgetInst WHERE WidgetInstId = 14008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 14008) END FROM WidgetInst WHERE WidgetInstId = 14008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14011;


