# QueryInst

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


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 = 13667) END FROM WidgetInst WHERE WidgetInstId = 13667) = 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 = 'File' AND WidgetInstId = 13668) END FROM WidgetInst WHERE WidgetInstId = 13668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13674;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 13690) END FROM WidgetInst WHERE WidgetInstId = 13690) = 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 = 'Constant' AND WidgetInstId = 13747) END FROM WidgetInst WHERE WidgetInstId = 13747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13749;


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 13776) END FROM WidgetInst WHERE WidgetInstId = 13776) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 13689) END FROM WidgetInst WHERE WidgetInstId = 13689) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 13771) END FROM WidgetInst WHERE WidgetInstId = 13771)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13795;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 13690) END FROM WidgetInst WHERE WidgetInstId = 13690) = 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 = 'user' AND WidgetInstId = 13929) END FROM WidgetInst WHERE WidgetInstId = 13929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13931;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


# QueryDef

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


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


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 ('Mainland','Island','Levee outflow','River inflow') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


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


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


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: cold start' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('Linear bottom friction','Quadratic bottom friction','Hybrid nonlinear bottom friction') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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 ('Quadratic bottom friction','Hybrid nonlinear bottom friction') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Quadratic friction nodal attribute - Fric' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mannings N nodal attribute - ManningsN' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Chezy C nodal attribute - ChezyFric' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM OrOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('No wetting/drying','With wetting/drying') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pure primitive equation: TAU0 specified' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spatially discrete/time constant: TAU0 = -1' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spatially variable/time constant: TAU0 = -2' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('Barotropic 2DDI using lumped GWCE (explicit)','Barotropic 3D using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('Barotropic 2DDI using lumped GWCE (explicit)','Barotropic 3D using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('1','2','3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('2','3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NetCDF','NetCDF4') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   12 - Velocity/Pressure OWI files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   12 - Velocity/Pressure OWI files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('NWS =    2 - Stress/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format','NWS =    5 - Velocity/Pressure - every node/time interval','NWS =   12 - Velocity/Pressure OWI files','NWS =   15 - HWind files','NWS =   16 - GFDL files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    5 - Velocity/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format','NWS =    5 - Velocity/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    8 - Symmetric cyclonic storm from path','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   19 - Asymmetric cyclonic storm from path','NWS =   20 - GAHM Format cyclonic storm path') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   12 - Velocity/Pressure OWI files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   12 - Velocity/Pressure OWI files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 ('NWS =   15 - HWind files','NWS =   16 - GFDL files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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 central pressure' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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 ('NWS =    3 - Velocity in US Navy Fleet Numeric format','NWS =    6 - Velocity/Pressure on grid') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =    3 - Velocity in US Navy Fleet Numeric format' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =    6 - Velocity/Pressure on grid' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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 ('NWS =    8 - Symmetric cyclonic storm from path','NWS =   19 - Asymmetric cyclonic storm from path','NWS =   20 - GAHM Format cyclonic storm path') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   20 - GAHM Format cyclonic storm path' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


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


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('Barotropic 2DDI','Barotropic 2DDI using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 29 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 137 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 139 AND WidgetInstId = ?;


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


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 159 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 161 AND WidgetInstId = ?;


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


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


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 197 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 199 AND WidgetInstId = ?;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Full plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Source terms and propagation' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant value' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 463 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 464 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 466 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 467 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 469 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 470 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 472 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 473 AND WidgetInstId = ?;


