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


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


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 = 9487) END FROM WidgetInst WHERE WidgetInstId = 9487) = 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 9488) END FROM WidgetInst WHERE WidgetInstId = 9488) = 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 9489) END FROM WidgetInst WHERE WidgetInstId = 9489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9570;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 9487) END FROM WidgetInst WHERE WidgetInstId = 9487) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9488) END FROM WidgetInst WHERE WidgetInstId = 9488) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9489) END FROM WidgetInst WHERE WidgetInstId = 9489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9693;


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 = 9487) END FROM WidgetInst WHERE WidgetInstId = 9487) = 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 = 'Culvert' AND WidgetInstId = 9488) END FROM WidgetInst WHERE WidgetInstId = 9488) = 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 = 'Culvert' AND WidgetInstId = 9489) END FROM WidgetInst WHERE WidgetInstId = 9489) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9702;


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


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


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


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


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


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


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


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


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 = 9487) END FROM WidgetInst WHERE WidgetInstId = 9487) = 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 = 'Weir' AND WidgetInstId = 9488) END FROM WidgetInst WHERE WidgetInstId = 9488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9821;


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


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


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


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


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


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


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


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


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


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 = 9487) END FROM WidgetInst WHERE WidgetInstId = 9487) = 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 = 'Gate' AND WidgetInstId = 9488) END FROM WidgetInst WHERE WidgetInstId = 9488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9869;


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 = 9489) END FROM WidgetInst WHERE WidgetInstId = 9489) = 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 = 'user' AND WidgetInstId = 9907) END FROM WidgetInst WHERE WidgetInstId = 9907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9910;


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


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


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


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


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


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


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


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 = 9487) END FROM WidgetInst WHERE WidgetInstId = 9487) = 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 = 'Pressure' AND WidgetInstId = 9488) END FROM WidgetInst WHERE WidgetInstId = 9488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9929;


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 = 9489) END FROM WidgetInst WHERE WidgetInstId = 9489) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9967) END FROM WidgetInst WHERE WidgetInstId = 9967) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9968) END FROM WidgetInst WHERE WidgetInstId = 9968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9971;


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 = 9969) END FROM WidgetInst WHERE WidgetInstId = 9969) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9967) END FROM WidgetInst WHERE WidgetInstId = 9967) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9968) END FROM WidgetInst WHERE WidgetInstId = 9968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9977;


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 = 9969) END FROM WidgetInst WHERE WidgetInstId = 9969) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9967) END FROM WidgetInst WHERE WidgetInstId = 9967) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9968) END FROM WidgetInst WHERE WidgetInstId = 9968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9983;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 9489) END FROM WidgetInst WHERE WidgetInstId = 9489) = 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 = 'Constant' AND WidgetInstId = 10084) END FROM WidgetInst WHERE WidgetInstId = 10084) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10087;


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


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


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


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


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 = 10085) END FROM WidgetInst WHERE WidgetInstId = 10085) = 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 = 'Weir' AND WidgetInstId = 10086) END FROM WidgetInst WHERE WidgetInstId = 10086) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10107;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 10195) END FROM WidgetInst WHERE WidgetInstId = 10195) = 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 = 'File' AND WidgetInstId = 10196) END FROM WidgetInst WHERE WidgetInstId = 10196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10199;


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 = 10197) END FROM WidgetInst WHERE WidgetInstId = 10197) = 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 TextValues WHERE Value = 'Restart File' AND WidgetInstId = 10290) END FROM WidgetInst WHERE WidgetInstId = 10290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10291;


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


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


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 = 10307) END FROM WidgetInst WHERE WidgetInstId = 10307) = 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 = 'Specified Times' AND WidgetInstId = 10307) END FROM WidgetInst WHERE WidgetInstId = 10307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10310;


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


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


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


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


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


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


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


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 = 10391) END FROM WidgetInst WHERE WidgetInstId = 10391) = 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 = 'Specified Frequency' AND WidgetInstId = 10400) END FROM WidgetInst WHERE WidgetInstId = 10400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10401;


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


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


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


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 = 10436) END FROM WidgetInst WHERE WidgetInstId = 10436) = 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 = 'Specified Frequency' AND WidgetInstId = 10445) END FROM WidgetInst WHERE WidgetInstId = 10445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10446;


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


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 = 10467) END FROM WidgetInst WHERE WidgetInstId = 10467) = 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 = 'Initial Water Surface Elevation' AND WidgetInstId = 10467) END FROM WidgetInst WHERE WidgetInstId = 10467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10470;


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


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


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


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


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


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


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 = 10562) END FROM WidgetInst WHERE WidgetInstId = 10562) = 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 = 'Specified Times' AND WidgetInstId = 10562) END FROM WidgetInst WHERE WidgetInstId = 10562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10565;


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


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


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 = 10582) END FROM WidgetInst WHERE WidgetInstId = 10582) = 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 = 'Parker' AND WidgetInstId = 10582) END FROM WidgetInst WHERE WidgetInstId = 10582) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10591;


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


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


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


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


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


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


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


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


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


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


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 = 10587) END FROM WidgetInst WHERE WidgetInstId = 10587) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 10589) END FROM WidgetInst WHERE WidgetInstId = 10589) = 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 = 'Wu-et-al' AND WidgetInstId = 10582) END FROM WidgetInst WHERE WidgetInstId = 10582) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10621;


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 = 10587) END FROM WidgetInst WHERE WidgetInstId = 10587) = 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 = 'Wu-et-al' AND WidgetInstId = 10589) END FROM WidgetInst WHERE WidgetInstId = 10589) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10625;


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


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


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


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 = 10582) END FROM WidgetInst WHERE WidgetInstId = 10582) = 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 = 'Trinity' AND WidgetInstId = 10582) END FROM WidgetInst WHERE WidgetInstId = 10582) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10635;


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


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 = 10582) END FROM WidgetInst WHERE WidgetInstId = 10582) = 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 = 'Seminara' AND WidgetInstId = 10582) END FROM WidgetInst WHERE WidgetInstId = 10582) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10645;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 11198) END FROM WidgetInst WHERE WidgetInstId = 11198) = 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 = 'On' AND WidgetInstId = 11201) END FROM WidgetInst WHERE WidgetInstId = 11201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11202;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 11198) END FROM WidgetInst WHERE WidgetInstId = 11198) = 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 = 'user' AND WidgetInstId = 11302) END FROM WidgetInst WHERE WidgetInstId = 11302) = 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 = 'user' AND WidgetInstId = 11302) END FROM WidgetInst WHERE WidgetInstId = 11302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11305;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 11439) END FROM WidgetInst WHERE WidgetInstId = 11439) = 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 = 'user' AND WidgetInstId = 11559) END FROM WidgetInst WHERE WidgetInstId = 11559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11560;


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


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 = 11439) END FROM WidgetInst WHERE WidgetInstId = 11439) = 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 = 'user' AND WidgetInstId = 11579) END FROM WidgetInst WHERE WidgetInstId = 11579) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11580;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 11680) END FROM WidgetInst WHERE WidgetInstId = 11680) = 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 = 'On' AND WidgetInstId = 11683) END FROM WidgetInst WHERE WidgetInstId = 11683) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11684;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11784) END FROM WidgetInst WHERE WidgetInstId = 11784) = 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 = 'user' AND WidgetInstId = 11784) END FROM WidgetInst WHERE WidgetInstId = 11784) = 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 = 'user' AND WidgetInstId = 11784) END FROM WidgetInst WHERE WidgetInstId = 11784) = 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 = 'Weir' AND WidgetInstId = 11680) END FROM WidgetInst WHERE WidgetInstId = 11680) = 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 = 'user' AND WidgetInstId = 11800) END FROM WidgetInst WHERE WidgetInstId = 11800) = 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 = 'user' AND WidgetInstId = 11800) END FROM WidgetInst WHERE WidgetInstId = 11800) = 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 = 'user' AND WidgetInstId = 11800) END FROM WidgetInst WHERE WidgetInstId = 11800) = 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 = 'Gate' AND WidgetInstId = 11680) END FROM WidgetInst WHERE WidgetInstId = 11680) = 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 = 'user' AND WidgetInstId = 11820) END FROM WidgetInst WHERE WidgetInstId = 11820) = 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 = 'user' AND WidgetInstId = 11820) END FROM WidgetInst WHERE WidgetInstId = 11820) = 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 = 'user' AND WidgetInstId = 11820) END FROM WidgetInst WHERE WidgetInstId = 11820) = 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 = 'Pressure' AND WidgetInstId = 11680) END FROM WidgetInst WHERE WidgetInstId = 11680) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 11840) END FROM WidgetInst WHERE WidgetInstId = 11840) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 11840) END FROM WidgetInst WHERE WidgetInstId = 11840) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 11840) END FROM WidgetInst WHERE WidgetInstId = 11840) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11845;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 11921) END FROM WidgetInst WHERE WidgetInstId = 11921) = 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 = 11921) END FROM WidgetInst WHERE WidgetInstId = 11921) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11962) END FROM WidgetInst WHERE WidgetInstId = 11962)) = 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 = 'U.S. Customary' AND WidgetInstId = 11964) END FROM WidgetInst WHERE WidgetInstId = 11964) = 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 = 'Metric' AND WidgetInstId = 11964) END FROM WidgetInst WHERE WidgetInstId = 11964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11969;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 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 = 12162) END FROM WidgetInst WHERE WidgetInstId = 12162) = 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 = 'On' AND WidgetInstId = 12165) END FROM WidgetInst WHERE WidgetInstId = 12165) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12166;


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


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


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


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


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


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 = 12162) END FROM WidgetInst WHERE WidgetInstId = 12162) = 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 = 'Constant' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12192;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 12162) END FROM WidgetInst WHERE WidgetInstId = 12162) = 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 = 'user' AND WidgetInstId = 12266) END FROM WidgetInst WHERE WidgetInstId = 12266) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12267;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 12403) END FROM WidgetInst WHERE WidgetInstId = 12403) = 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 = 'user' AND WidgetInstId = 12515) END FROM WidgetInst WHERE WidgetInstId = 12515) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12516;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 12951) END FROM WidgetInst WHERE WidgetInstId = 12951) = 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 TextValues WHERE Value = 'Parker' AND WidgetInstId = 12953) END FROM WidgetInst WHERE WidgetInstId = 12953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12965;


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


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


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


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 = 12946) END FROM WidgetInst WHERE WidgetInstId = 12946) = 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 TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 12951) END FROM WidgetInst WHERE WidgetInstId = 12951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12975;


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


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


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


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 = 12953) END FROM WidgetInst WHERE WidgetInstId = 12953) = 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 TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 12946) END FROM WidgetInst WHERE WidgetInstId = 12946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12985;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13341) END FROM WidgetInst WHERE WidgetInstId = 13341) = 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 = 'Time Series' AND WidgetInstId = 13341) END FROM WidgetInst WHERE WidgetInstId = 13341) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13345;


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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13350) END FROM WidgetInst WHERE WidgetInstId = 13350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13351;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13350) END FROM WidgetInst WHERE WidgetInstId = 13350) = 1 THEN 1 ELSE 0 END WHERE 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 = 'Rating Curve' AND WidgetInstId = 13350) END FROM WidgetInst WHERE WidgetInstId = 13350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13357;


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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13360;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13362) END FROM WidgetInst WHERE WidgetInstId = 13362)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13364) END FROM WidgetInst WHERE WidgetInstId = 13364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13364) END FROM WidgetInst WHERE WidgetInstId = 13364) = 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 = 'U.S. Customary' AND WidgetInstId = 13364) END FROM WidgetInst WHERE WidgetInstId = 13364) = 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 = 'Metric' AND WidgetInstId = 13364) END FROM WidgetInst WHERE WidgetInstId = 13364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13373;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13362) END FROM WidgetInst WHERE WidgetInstId = 13362)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13364) END FROM WidgetInst WHERE WidgetInstId = 13364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13364) END FROM WidgetInst WHERE WidgetInstId = 13364) = 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 = 'Time Series' AND WidgetInstId = 13380) END FROM WidgetInst WHERE WidgetInstId = 13380) = 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 = 'U.S. Customary' AND WidgetInstId = 13364) END FROM WidgetInst WHERE WidgetInstId = 13364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13364) END FROM WidgetInst WHERE WidgetInstId = 13364) = 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 = 'Rating Curve' AND WidgetInstId = 13380) END FROM WidgetInst WHERE WidgetInstId = 13380) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13364) END FROM WidgetInst WHERE WidgetInstId = 13364) = 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 = 'Metric' AND WidgetInstId = 13364) END FROM WidgetInst WHERE WidgetInstId = 13364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13388;


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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13389;


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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13425) END FROM WidgetInst WHERE WidgetInstId = 13425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13425) END FROM WidgetInst WHERE WidgetInstId = 13425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13425) END FROM WidgetInst WHERE WidgetInstId = 13425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13430;


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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13441) END FROM WidgetInst WHERE WidgetInstId = 13441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13441) END FROM WidgetInst WHERE WidgetInstId = 13441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13441) END FROM WidgetInst WHERE WidgetInstId = 13441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13446;


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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13461) END FROM WidgetInst WHERE WidgetInstId = 13461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13461) END FROM WidgetInst WHERE WidgetInstId = 13461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13461) END FROM WidgetInst WHERE WidgetInstId = 13461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13466;


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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13468;


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 = 13481) END FROM WidgetInst WHERE WidgetInstId = 13481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13482;


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 = 13481) END FROM WidgetInst WHERE WidgetInstId = 13481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13484;


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 = 13481) END FROM WidgetInst WHERE WidgetInstId = 13481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13486;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13487) END FROM WidgetInst WHERE WidgetInstId = 13487) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13481) END FROM WidgetInst WHERE WidgetInstId = 13481)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13488;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13487) END FROM WidgetInst WHERE WidgetInstId = 13487) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13481) END FROM WidgetInst WHERE WidgetInstId = 13481)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13490;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13487) END FROM WidgetInst WHERE WidgetInstId = 13487) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13481) END FROM WidgetInst WHERE WidgetInstId = 13481)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13492;


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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13494;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13496) END FROM WidgetInst WHERE WidgetInstId = 13496) = 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 = 'Time Series' AND WidgetInstId = 13496) END FROM WidgetInst WHERE WidgetInstId = 13496) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13500;


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 = 13496) END FROM WidgetInst WHERE WidgetInstId = 13496) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13496) END FROM WidgetInst WHERE WidgetInstId = 13496) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13514;


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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) = 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 TextValues WHERE Value = 'Constant' AND WidgetInstId = 13520) END FROM WidgetInst WHERE WidgetInstId = 13520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13520) END FROM WidgetInst WHERE WidgetInstId = 13520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13524;


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 = 13520) END FROM WidgetInst WHERE WidgetInstId = 13520) = 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 = 'Rating curve' AND WidgetInstId = 13520) END FROM WidgetInst WHERE WidgetInstId = 13520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13538;


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 = 13542) END FROM WidgetInst WHERE WidgetInstId = 13542) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13542) END FROM WidgetInst WHERE WidgetInstId = 13542) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13542) END FROM WidgetInst WHERE WidgetInstId = 13542) = 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 = 'Computed' AND WidgetInstId = 13542) END FROM WidgetInst WHERE WidgetInstId = 13542) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13542) END FROM WidgetInst WHERE WidgetInstId = 13542) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13542) END FROM WidgetInst WHERE WidgetInstId = 13542) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13553;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13321) END FROM WidgetInst WHERE WidgetInstId = 13321) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12938) END FROM WidgetInst WHERE WidgetInstId = 12938)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13555;


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 = 13557) END FROM WidgetInst WHERE WidgetInstId = 13557) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13558;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 13562;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 13562;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 13562;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 13562;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 13562;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 13562;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13563;


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 = 13565) END FROM WidgetInst WHERE WidgetInstId = 13565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13566;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13568;


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 = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13574;


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 = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13577;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 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 = 'Constant' AND WidgetInstId = 13582) END FROM WidgetInst WHERE WidgetInstId = 13582) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13582) END FROM WidgetInst WHERE WidgetInstId = 13582) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13586;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13591) END FROM WidgetInst WHERE WidgetInstId = 13591) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13591) END FROM WidgetInst WHERE WidgetInstId = 13591) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 13591) END FROM WidgetInst WHERE WidgetInstId = 13591) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13598;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13601;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13603) END FROM WidgetInst WHERE WidgetInstId = 13603)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13605) END FROM WidgetInst WHERE WidgetInstId = 13605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13605) END FROM WidgetInst WHERE WidgetInstId = 13605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13605) END FROM WidgetInst WHERE WidgetInstId = 13605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13605) END FROM WidgetInst WHERE WidgetInstId = 13605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13614;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13603) END FROM WidgetInst WHERE WidgetInstId = 13603)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13605) END FROM WidgetInst WHERE WidgetInstId = 13605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13605) END FROM WidgetInst WHERE WidgetInstId = 13605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13621) END FROM WidgetInst WHERE WidgetInstId = 13621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13622;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13605) END FROM WidgetInst WHERE WidgetInstId = 13605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13605) END FROM WidgetInst WHERE WidgetInstId = 13605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 13621) END FROM WidgetInst WHERE WidgetInstId = 13621) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13605) END FROM WidgetInst WHERE WidgetInstId = 13605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13605) END FROM WidgetInst WHERE WidgetInstId = 13605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13629;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13630;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13666) END FROM WidgetInst WHERE WidgetInstId = 13666) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13666) END FROM WidgetInst WHERE WidgetInstId = 13666) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13666) END FROM WidgetInst WHERE WidgetInstId = 13666) = 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 = 'Weir' AND WidgetInstId = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 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 = 'user' AND WidgetInstId = 13682) END FROM WidgetInst WHERE WidgetInstId = 13682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13682) END FROM WidgetInst WHERE WidgetInstId = 13682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13682) END FROM WidgetInst WHERE WidgetInstId = 13682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13687;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13702) END FROM WidgetInst WHERE WidgetInstId = 13702) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13703;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13702) END FROM WidgetInst WHERE WidgetInstId = 13702) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13702) END FROM WidgetInst WHERE WidgetInstId = 13702) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13707;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13709;


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 = 13722) END FROM WidgetInst WHERE WidgetInstId = 13722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13723;


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 = 13722) END FROM WidgetInst WHERE WidgetInstId = 13722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13725;


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 = 13722) END FROM WidgetInst WHERE WidgetInstId = 13722) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13727;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13728) END FROM WidgetInst WHERE WidgetInstId = 13728) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13722) END FROM WidgetInst WHERE WidgetInstId = 13722)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13729;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13728) END FROM WidgetInst WHERE WidgetInstId = 13728) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13722) END FROM WidgetInst WHERE WidgetInstId = 13722)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13731;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13728) END FROM WidgetInst WHERE WidgetInstId = 13728) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13722) END FROM WidgetInst WHERE WidgetInstId = 13722)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13733;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13737) END FROM WidgetInst WHERE WidgetInstId = 13737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13738;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13737) END FROM WidgetInst WHERE WidgetInstId = 13737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13741;


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 = 13737) END FROM WidgetInst WHERE WidgetInstId = 13737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13737) END FROM WidgetInst WHERE WidgetInstId = 13737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13755;


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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) = 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 = 'Constant' AND WidgetInstId = 13761) END FROM WidgetInst WHERE WidgetInstId = 13761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13761) END FROM WidgetInst WHERE WidgetInstId = 13761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13765;


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 = 13761) END FROM WidgetInst WHERE WidgetInstId = 13761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13761) END FROM WidgetInst WHERE WidgetInstId = 13761) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13779;


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 = 13783) END FROM WidgetInst WHERE WidgetInstId = 13783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13783) END FROM WidgetInst WHERE WidgetInstId = 13783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13783) END FROM WidgetInst WHERE WidgetInstId = 13783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13783) END FROM WidgetInst WHERE WidgetInstId = 13783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13783) END FROM WidgetInst WHERE WidgetInstId = 13783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 13783) END FROM WidgetInst WHERE WidgetInstId = 13783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13794;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13562) END FROM WidgetInst WHERE WidgetInstId = 13562) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12938) END FROM WidgetInst WHERE WidgetInstId = 12938)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13796;


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 = 13798) END FROM WidgetInst WHERE WidgetInstId = 13798) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13799;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 13803;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 13803;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 13803;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 13803;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 13803;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 13803;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13804;


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 = 13806) END FROM WidgetInst WHERE WidgetInstId = 13806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13807;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13809;


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 = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13815;


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 = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13818;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13823) END FROM WidgetInst WHERE WidgetInstId = 13823) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13823) END FROM WidgetInst WHERE WidgetInstId = 13823) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13827;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13832) END FROM WidgetInst WHERE WidgetInstId = 13832) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13832) END FROM WidgetInst WHERE WidgetInstId = 13832) = 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 = 'Rating Curve' AND WidgetInstId = 13832) END FROM WidgetInst WHERE WidgetInstId = 13832) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13839;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13842;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13844) END FROM WidgetInst WHERE WidgetInstId = 13844)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13846) END FROM WidgetInst WHERE WidgetInstId = 13846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13846) END FROM WidgetInst WHERE WidgetInstId = 13846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13846) END FROM WidgetInst WHERE WidgetInstId = 13846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13854;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13846) END FROM WidgetInst WHERE WidgetInstId = 13846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13855;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13844) END FROM WidgetInst WHERE WidgetInstId = 13844)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13856;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13846) END FROM WidgetInst WHERE WidgetInstId = 13846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13846) END FROM WidgetInst WHERE WidgetInstId = 13846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13862) END FROM WidgetInst WHERE WidgetInstId = 13862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13846) END FROM WidgetInst WHERE WidgetInstId = 13846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13846) END FROM WidgetInst WHERE WidgetInstId = 13846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 13862) END FROM WidgetInst WHERE WidgetInstId = 13862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 13846) END FROM WidgetInst WHERE WidgetInstId = 13846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13846) END FROM WidgetInst WHERE WidgetInstId = 13846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13870;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13871;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13907) END FROM WidgetInst WHERE WidgetInstId = 13907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13908;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13907) END FROM WidgetInst WHERE WidgetInstId = 13907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13907) END FROM WidgetInst WHERE WidgetInstId = 13907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13912;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 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 = 'user' AND WidgetInstId = 13923) END FROM WidgetInst WHERE WidgetInstId = 13923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13923) END FROM WidgetInst WHERE WidgetInstId = 13923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13923) END FROM WidgetInst WHERE WidgetInstId = 13923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13928;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13943) END FROM WidgetInst WHERE WidgetInstId = 13943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13944;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13943) END FROM WidgetInst WHERE WidgetInstId = 13943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 13943) END FROM WidgetInst WHERE WidgetInstId = 13943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13948;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13950;


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 = 13963) END FROM WidgetInst WHERE WidgetInstId = 13963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13964;


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 = 13963) END FROM WidgetInst WHERE WidgetInstId = 13963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13966;


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 = 13963) END FROM WidgetInst WHERE WidgetInstId = 13963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13968;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13969) END FROM WidgetInst WHERE WidgetInstId = 13969) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13963) END FROM WidgetInst WHERE WidgetInstId = 13963)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13970;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13969) END FROM WidgetInst WHERE WidgetInstId = 13969) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13963) END FROM WidgetInst WHERE WidgetInstId = 13963)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13972;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13969) END FROM WidgetInst WHERE WidgetInstId = 13969) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 13963) END FROM WidgetInst WHERE WidgetInstId = 13963)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13974;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 13978) END FROM WidgetInst WHERE WidgetInstId = 13978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13978) END FROM WidgetInst WHERE WidgetInstId = 13978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13982;


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 = 13978) END FROM WidgetInst WHERE WidgetInstId = 13978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 13978) END FROM WidgetInst WHERE WidgetInstId = 13978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13996;


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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14002) END FROM WidgetInst WHERE WidgetInstId = 14002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14002) END FROM WidgetInst WHERE WidgetInstId = 14002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14006;


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 = 14002) END FROM WidgetInst WHERE WidgetInstId = 14002) = 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 = 'Rating curve' AND WidgetInstId = 14002) END FROM WidgetInst WHERE WidgetInstId = 14002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14020;


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 = 14024) END FROM WidgetInst WHERE WidgetInstId = 14024) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14024) END FROM WidgetInst WHERE WidgetInstId = 14024) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14024) END FROM WidgetInst WHERE WidgetInstId = 14024) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14024) END FROM WidgetInst WHERE WidgetInstId = 14024) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14024) END FROM WidgetInst WHERE WidgetInstId = 14024) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14024) END FROM WidgetInst WHERE WidgetInstId = 14024) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14035;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 13803) END FROM WidgetInst WHERE WidgetInstId = 13803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12938) END FROM WidgetInst WHERE WidgetInstId = 12938)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14037;


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 = 14039) END FROM WidgetInst WHERE WidgetInstId = 14039) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14040;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 14044;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 14044;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 14044;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 14044;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 14044;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 14044;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14045;


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 = 14047) END FROM WidgetInst WHERE WidgetInstId = 14047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14048;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14050;


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 = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14056;


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 = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14059;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14064) END FROM WidgetInst WHERE WidgetInstId = 14064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14064) END FROM WidgetInst WHERE WidgetInstId = 14064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14068;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14073) END FROM WidgetInst WHERE WidgetInstId = 14073) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14073) END FROM WidgetInst WHERE WidgetInstId = 14073) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 14073) END FROM WidgetInst WHERE WidgetInstId = 14073) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14080;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14083;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14085) END FROM WidgetInst WHERE WidgetInstId = 14085)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14087) END FROM WidgetInst WHERE WidgetInstId = 14087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14087) END FROM WidgetInst WHERE WidgetInstId = 14087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14087) END FROM WidgetInst WHERE WidgetInstId = 14087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14095;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14087) END FROM WidgetInst WHERE WidgetInstId = 14087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14096;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14085) END FROM WidgetInst WHERE WidgetInstId = 14085)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14097;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14087) END FROM WidgetInst WHERE WidgetInstId = 14087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14087) END FROM WidgetInst WHERE WidgetInstId = 14087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14103) END FROM WidgetInst WHERE WidgetInstId = 14103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14087) END FROM WidgetInst WHERE WidgetInstId = 14087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14087) END FROM WidgetInst WHERE WidgetInstId = 14087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 14103) END FROM WidgetInst WHERE WidgetInstId = 14103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14087) END FROM WidgetInst WHERE WidgetInstId = 14087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14087) END FROM WidgetInst WHERE WidgetInstId = 14087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14111;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14112;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14148) END FROM WidgetInst WHERE WidgetInstId = 14148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14148) END FROM WidgetInst WHERE WidgetInstId = 14148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14148) END FROM WidgetInst WHERE WidgetInstId = 14148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14153;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14164) END FROM WidgetInst WHERE WidgetInstId = 14164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14164) END FROM WidgetInst WHERE WidgetInstId = 14164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14164) END FROM WidgetInst WHERE WidgetInstId = 14164) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14169;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14184) END FROM WidgetInst WHERE WidgetInstId = 14184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14184) END FROM WidgetInst WHERE WidgetInstId = 14184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 14184) END FROM WidgetInst WHERE WidgetInstId = 14184) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14189;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14191;


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 = 14204) END FROM WidgetInst WHERE WidgetInstId = 14204) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14205;


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 = 14204) END FROM WidgetInst WHERE WidgetInstId = 14204) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14207;


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 = 14204) END FROM WidgetInst WHERE WidgetInstId = 14204) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14209;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 14210) END FROM WidgetInst WHERE WidgetInstId = 14210) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14204) END FROM WidgetInst WHERE WidgetInstId = 14204)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14211;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 14210) END FROM WidgetInst WHERE WidgetInstId = 14210) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14204) END FROM WidgetInst WHERE WidgetInstId = 14204)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14213;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 14210) END FROM WidgetInst WHERE WidgetInstId = 14210) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 14204) END FROM WidgetInst WHERE WidgetInstId = 14204)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14215;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14219) END FROM WidgetInst WHERE WidgetInstId = 14219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14220;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14219) END FROM WidgetInst WHERE WidgetInstId = 14219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14223;


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 = 14219) END FROM WidgetInst WHERE WidgetInstId = 14219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14226;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 14219) END FROM WidgetInst WHERE WidgetInstId = 14219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14237;


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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14243) END FROM WidgetInst WHERE WidgetInstId = 14243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14243) END FROM WidgetInst WHERE WidgetInstId = 14243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14247;


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 = 14243) END FROM WidgetInst WHERE WidgetInstId = 14243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 14243) END FROM WidgetInst WHERE WidgetInstId = 14243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14261;


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 = 14265) END FROM WidgetInst WHERE WidgetInstId = 14265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14265) END FROM WidgetInst WHERE WidgetInstId = 14265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14265) END FROM WidgetInst WHERE WidgetInstId = 14265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14265) END FROM WidgetInst WHERE WidgetInstId = 14265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14265) END FROM WidgetInst WHERE WidgetInstId = 14265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 14265) END FROM WidgetInst WHERE WidgetInstId = 14265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14276;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 14044) END FROM WidgetInst WHERE WidgetInstId = 14044) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 12938) END FROM WidgetInst WHERE WidgetInstId = 12938)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14278;


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 = 14280) END FROM WidgetInst WHERE WidgetInstId = 14280) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14281;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 14285;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 14285;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 14285;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 14285;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 14285;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 14285;


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 = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14286;


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 = 14288) END FROM WidgetInst WHERE WidgetInstId = 14288) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14289;


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 = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14291;


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 = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14297;


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 = 12935) END FROM WidgetInst WHERE WidgetInstId = 12935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14300;


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 = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14305) END FROM WidgetInst WHERE WidgetInstId = 14305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14306;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14305) END FROM WidgetInst WHERE WidgetInstId = 14305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14309;


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 = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14314) END FROM WidgetInst WHERE WidgetInstId = 14314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 14314) END FROM WidgetInst WHERE WidgetInstId = 14314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 14314) END FROM WidgetInst WHERE WidgetInstId = 14314) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14321;


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 = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14324;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 14285) END FROM WidgetInst WHERE WidgetInstId = 14285) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 14326) END FROM WidgetInst WHERE WidgetInstId = 14326)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14328) END FROM WidgetInst WHERE WidgetInstId = 14328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14332;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 14328) END FROM WidgetInst WHERE WidgetInstId = 14328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 14328) END FROM WidgetInst WHERE WidgetInstId = 14328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14336;


