# QueryInst

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7834) END FROM WidgetInst WHERE WidgetInstId = 7834) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7998) END FROM WidgetInst WHERE WidgetInstId = 7998)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8010;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9623) END FROM WidgetInst WHERE WidgetInstId = 9623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9719;


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 = 9448) END FROM WidgetInst WHERE WidgetInstId = 9448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9720;


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 = 9449) END FROM WidgetInst WHERE WidgetInstId = 9449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9721;


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 = 9450) END FROM WidgetInst WHERE WidgetInstId = 9450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9722;


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 = 9451) END FROM WidgetInst WHERE WidgetInstId = 9451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9723;


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 = 9448) END FROM WidgetInst WHERE WidgetInstId = 9448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9732;


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 = 9449) END FROM WidgetInst WHERE WidgetInstId = 9449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9733;


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 = 9450) END FROM WidgetInst WHERE WidgetInstId = 9450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9734;


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 = 9451) END FROM WidgetInst WHERE WidgetInstId = 9451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9864) END FROM WidgetInst WHERE WidgetInstId = 9864) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9865) END FROM WidgetInst WHERE WidgetInstId = 9865) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9866) END FROM WidgetInst WHERE WidgetInstId = 9866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9867) END FROM WidgetInst WHERE WidgetInstId = 9867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9864) END FROM WidgetInst WHERE WidgetInstId = 9864) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9865) END FROM WidgetInst WHERE WidgetInstId = 9865) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9866) END FROM WidgetInst WHERE WidgetInstId = 9866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9867) END FROM WidgetInst WHERE WidgetInstId = 9867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9864) END FROM WidgetInst WHERE WidgetInstId = 9864) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9865) END FROM WidgetInst WHERE WidgetInstId = 9865) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9866) END FROM WidgetInst WHERE WidgetInstId = 9866) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9867) END FROM WidgetInst WHERE WidgetInstId = 9867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9887;


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 = 9448) END FROM WidgetInst WHERE WidgetInstId = 9448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9892;


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 = 9449) END FROM WidgetInst WHERE WidgetInstId = 9449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9893;


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 = 9450) END FROM WidgetInst WHERE WidgetInstId = 9450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9894;


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 = 9451) END FROM WidgetInst WHERE WidgetInstId = 9451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9928) END FROM WidgetInst WHERE WidgetInstId = 9928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9929) END FROM WidgetInst WHERE WidgetInstId = 9929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9930) END FROM WidgetInst WHERE WidgetInstId = 9930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9931) END FROM WidgetInst WHERE WidgetInstId = 9931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9928) END FROM WidgetInst WHERE WidgetInstId = 9928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9929) END FROM WidgetInst WHERE WidgetInstId = 9929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9930) END FROM WidgetInst WHERE WidgetInstId = 9930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9931) END FROM WidgetInst WHERE WidgetInstId = 9931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9928) END FROM WidgetInst WHERE WidgetInstId = 9928) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9929) END FROM WidgetInst WHERE WidgetInstId = 9929) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9930) END FROM WidgetInst WHERE WidgetInstId = 9930) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9931) END FROM WidgetInst WHERE WidgetInstId = 9931) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9951;


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 = 9448) END FROM WidgetInst WHERE WidgetInstId = 9448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 9449) END FROM WidgetInst WHERE WidgetInstId = 9449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9957;


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 = 9450) END FROM WidgetInst WHERE WidgetInstId = 9450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 9451) END FROM WidgetInst WHERE WidgetInstId = 9451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10008) END FROM WidgetInst WHERE WidgetInstId = 10008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10009) END FROM WidgetInst WHERE WidgetInstId = 10009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10010) END FROM WidgetInst WHERE WidgetInstId = 10010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10011) END FROM WidgetInst WHERE WidgetInstId = 10011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10008) END FROM WidgetInst WHERE WidgetInstId = 10008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10009) END FROM WidgetInst WHERE WidgetInstId = 10009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10010) END FROM WidgetInst WHERE WidgetInstId = 10010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10011) END FROM WidgetInst WHERE WidgetInstId = 10011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10008) END FROM WidgetInst WHERE WidgetInstId = 10008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10009) END FROM WidgetInst WHERE WidgetInstId = 10009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10010) END FROM WidgetInst WHERE WidgetInstId = 10010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10011) END FROM WidgetInst WHERE WidgetInstId = 10011) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10031;


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 = 9448) END FROM WidgetInst WHERE WidgetInstId = 9448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10036;


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 = 9449) END FROM WidgetInst WHERE WidgetInstId = 9449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10037;


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 = 9450) END FROM WidgetInst WHERE WidgetInstId = 9450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10038;


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 = 9451) END FROM WidgetInst WHERE WidgetInstId = 9451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10039;


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 = 10088) END FROM WidgetInst WHERE WidgetInstId = 10088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10092;


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 = 10089) END FROM WidgetInst WHERE WidgetInstId = 10089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10093;


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 = 10090) END FROM WidgetInst WHERE WidgetInstId = 10090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10094;


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 = 10091) END FROM WidgetInst WHERE WidgetInstId = 10091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10095;


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 = 10088) END FROM WidgetInst WHERE WidgetInstId = 10088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10089) END FROM WidgetInst WHERE WidgetInstId = 10089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10090) END FROM WidgetInst WHERE WidgetInstId = 10090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10102;


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 = 10091) END FROM WidgetInst WHERE WidgetInstId = 10091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10103;


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 = 10088) END FROM WidgetInst WHERE WidgetInstId = 10088) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10108;


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 = 10089) END FROM WidgetInst WHERE WidgetInstId = 10089) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10090) END FROM WidgetInst WHERE WidgetInstId = 10090) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10091) END FROM WidgetInst WHERE WidgetInstId = 10091) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10111;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10112) END FROM WidgetInst WHERE WidgetInstId = 10112) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10088) END FROM WidgetInst WHERE WidgetInstId = 10088)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10116;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10113) END FROM WidgetInst WHERE WidgetInstId = 10113) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10089) END FROM WidgetInst WHERE WidgetInstId = 10089)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10117;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10114) END FROM WidgetInst WHERE WidgetInstId = 10114) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10090) END FROM WidgetInst WHERE WidgetInstId = 10090)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10118;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10115) END FROM WidgetInst WHERE WidgetInstId = 10115) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10091) END FROM WidgetInst WHERE WidgetInstId = 10091)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10119;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10112) END FROM WidgetInst WHERE WidgetInstId = 10112) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10088) END FROM WidgetInst WHERE WidgetInstId = 10088)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10124;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10113) END FROM WidgetInst WHERE WidgetInstId = 10113) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10089) END FROM WidgetInst WHERE WidgetInstId = 10089)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10125;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10114) END FROM WidgetInst WHERE WidgetInstId = 10114) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10090) END FROM WidgetInst WHERE WidgetInstId = 10090)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10126;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10115) END FROM WidgetInst WHERE WidgetInstId = 10115) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10091) END FROM WidgetInst WHERE WidgetInstId = 10091)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10127;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10112) END FROM WidgetInst WHERE WidgetInstId = 10112) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10088) END FROM WidgetInst WHERE WidgetInstId = 10088)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10132;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10113) END FROM WidgetInst WHERE WidgetInstId = 10113) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10089) END FROM WidgetInst WHERE WidgetInstId = 10089)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10133;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10114) END FROM WidgetInst WHERE WidgetInstId = 10114) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10090) END FROM WidgetInst WHERE WidgetInstId = 10090)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10134;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10115) END FROM WidgetInst WHERE WidgetInstId = 10115) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10091) END FROM WidgetInst WHERE WidgetInstId = 10091)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10135;


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 = 9448) END FROM WidgetInst WHERE WidgetInstId = 9448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 9449) END FROM WidgetInst WHERE WidgetInstId = 9449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10141;


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 = 9450) END FROM WidgetInst WHERE WidgetInstId = 9450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10142;


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 = 9451) END FROM WidgetInst WHERE WidgetInstId = 9451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10148) END FROM WidgetInst WHERE WidgetInstId = 10148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10149) END FROM WidgetInst WHERE WidgetInstId = 10149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10150) END FROM WidgetInst WHERE WidgetInstId = 10150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10151) END FROM WidgetInst WHERE WidgetInstId = 10151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10148) END FROM WidgetInst WHERE WidgetInstId = 10148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10149) END FROM WidgetInst WHERE WidgetInstId = 10149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10150) END FROM WidgetInst WHERE WidgetInstId = 10150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10151) END FROM WidgetInst WHERE WidgetInstId = 10151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10148) END FROM WidgetInst WHERE WidgetInstId = 10148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10149) END FROM WidgetInst WHERE WidgetInstId = 10149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10150) END FROM WidgetInst WHERE WidgetInstId = 10150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10151) END FROM WidgetInst WHERE WidgetInstId = 10151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10148) END FROM WidgetInst WHERE WidgetInstId = 10148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10220;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10149) END FROM WidgetInst WHERE WidgetInstId = 10149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10150) END FROM WidgetInst WHERE WidgetInstId = 10150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10222;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10151) END FROM WidgetInst WHERE WidgetInstId = 10151) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10223;


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 = 9448) END FROM WidgetInst WHERE WidgetInstId = 9448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 9449) END FROM WidgetInst WHERE WidgetInstId = 9449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10233;


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 = 9450) END FROM WidgetInst WHERE WidgetInstId = 9450) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10234;


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 = 9451) END FROM WidgetInst WHERE WidgetInstId = 9451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10244) END FROM WidgetInst WHERE WidgetInstId = 10244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10245) END FROM WidgetInst WHERE WidgetInstId = 10245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10246) END FROM WidgetInst WHERE WidgetInstId = 10246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10247) END FROM WidgetInst WHERE WidgetInstId = 10247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10244) END FROM WidgetInst WHERE WidgetInstId = 10244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10245) END FROM WidgetInst WHERE WidgetInstId = 10245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10246) END FROM WidgetInst WHERE WidgetInstId = 10246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10247) END FROM WidgetInst WHERE WidgetInstId = 10247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10263;


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 = 10244) END FROM WidgetInst WHERE WidgetInstId = 10244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10272;


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 = 10245) END FROM WidgetInst WHERE WidgetInstId = 10245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10273;


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 = 10246) END FROM WidgetInst WHERE WidgetInstId = 10246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10274;


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 = 10247) END FROM WidgetInst WHERE WidgetInstId = 10247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10244) END FROM WidgetInst WHERE WidgetInstId = 10244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10245) END FROM WidgetInst WHERE WidgetInstId = 10245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10246) END FROM WidgetInst WHERE WidgetInstId = 10246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10247) END FROM WidgetInst WHERE WidgetInstId = 10247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10319;


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 = 10332) END FROM WidgetInst WHERE WidgetInstId = 10332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10336;


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 = 10333) END FROM WidgetInst WHERE WidgetInstId = 10333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10337;


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 = 10334) END FROM WidgetInst WHERE WidgetInstId = 10334) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10338;


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 = 10335) END FROM WidgetInst WHERE WidgetInstId = 10335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10332) END FROM WidgetInst WHERE WidgetInstId = 10332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10333) END FROM WidgetInst WHERE WidgetInstId = 10333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10334) END FROM WidgetInst WHERE WidgetInstId = 10334) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10335) END FROM WidgetInst WHERE WidgetInstId = 10335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10332) END FROM WidgetInst WHERE WidgetInstId = 10332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10333) END FROM WidgetInst WHERE WidgetInstId = 10333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10334) END FROM WidgetInst WHERE WidgetInstId = 10334) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10354;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10335) END FROM WidgetInst WHERE WidgetInstId = 10335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10355;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10332) END FROM WidgetInst WHERE WidgetInstId = 10332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10333) END FROM WidgetInst WHERE WidgetInstId = 10333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10334) END FROM WidgetInst WHERE WidgetInstId = 10334) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10335) END FROM WidgetInst WHERE WidgetInstId = 10335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10332) END FROM WidgetInst WHERE WidgetInstId = 10332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10333) END FROM WidgetInst WHERE WidgetInstId = 10333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10369;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10334) END FROM WidgetInst WHERE WidgetInstId = 10334) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10335) END FROM WidgetInst WHERE WidgetInstId = 10335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10332) END FROM WidgetInst WHERE WidgetInstId = 10332) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10333) END FROM WidgetInst WHERE WidgetInstId = 10333) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10334) END FROM WidgetInst WHERE WidgetInstId = 10334) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10335) END FROM WidgetInst WHERE WidgetInstId = 10335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10379;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9448) END FROM WidgetInst WHERE WidgetInstId = 9448) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 9059) END FROM WidgetInst WHERE WidgetInstId = 9059)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10384;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9449) END FROM WidgetInst WHERE WidgetInstId = 9449) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 9059) END FROM WidgetInst WHERE WidgetInstId = 9059)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10385;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9450) END FROM WidgetInst WHERE WidgetInstId = 9450) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 9059) END FROM WidgetInst WHERE WidgetInstId = 9059)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10386;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9451) END FROM WidgetInst WHERE WidgetInstId = 9451) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 9059) END FROM WidgetInst WHERE WidgetInstId = 9059)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10387;


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 = 10392) END FROM WidgetInst WHERE WidgetInstId = 10392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10396;


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 = 10393) END FROM WidgetInst WHERE WidgetInstId = 10393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10397;


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 = 10394) END FROM WidgetInst WHERE WidgetInstId = 10394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10398;


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 = 10395) END FROM WidgetInst WHERE WidgetInstId = 10395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10406;


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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10409) END FROM WidgetInst WHERE WidgetInstId = 10409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10410;


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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10412;


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 = 9056) END FROM WidgetInst WHERE WidgetInstId = 9056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10418;


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 = 9056) END FROM WidgetInst WHERE WidgetInstId = 9056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10421;


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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10426) END FROM WidgetInst WHERE WidgetInstId = 10426) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10426) END FROM WidgetInst WHERE WidgetInstId = 10426) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10430;


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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10435) END FROM WidgetInst WHERE WidgetInstId = 10435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10435) END FROM WidgetInst WHERE WidgetInstId = 10435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10435) END FROM WidgetInst WHERE WidgetInstId = 10435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10442;


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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10445;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10447) END FROM WidgetInst WHERE WidgetInstId = 10447)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10449) END FROM WidgetInst WHERE WidgetInstId = 10449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10449) END FROM WidgetInst WHERE WidgetInstId = 10449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10449) END FROM WidgetInst WHERE WidgetInstId = 10449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10457;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10449) END FROM WidgetInst WHERE WidgetInstId = 10449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10458;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10447) END FROM WidgetInst WHERE WidgetInstId = 10447)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10449) END FROM WidgetInst WHERE WidgetInstId = 10449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10449) END FROM WidgetInst WHERE WidgetInstId = 10449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10465) END FROM WidgetInst WHERE WidgetInstId = 10465) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10449) END FROM WidgetInst WHERE WidgetInstId = 10449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10449) END FROM WidgetInst WHERE WidgetInstId = 10449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10465) END FROM WidgetInst WHERE WidgetInstId = 10465) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10449) END FROM WidgetInst WHERE WidgetInstId = 10449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10449) END FROM WidgetInst WHERE WidgetInstId = 10449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10473;


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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10474;


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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10510) END FROM WidgetInst WHERE WidgetInstId = 10510) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10510) END FROM WidgetInst WHERE WidgetInstId = 10510) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10510) END FROM WidgetInst WHERE WidgetInstId = 10510) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10515;


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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10526) END FROM WidgetInst WHERE WidgetInstId = 10526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10526) END FROM WidgetInst WHERE WidgetInstId = 10526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10526) END FROM WidgetInst WHERE WidgetInstId = 10526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10531;


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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10546) END FROM WidgetInst WHERE WidgetInstId = 10546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10546) END FROM WidgetInst WHERE WidgetInstId = 10546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10546) END FROM WidgetInst WHERE WidgetInstId = 10546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10551;


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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10553;


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 = 10566) END FROM WidgetInst WHERE WidgetInstId = 10566) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10567;


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 = 10566) END FROM WidgetInst WHERE WidgetInstId = 10566) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10566) END FROM WidgetInst WHERE WidgetInstId = 10566) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10571;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10572) END FROM WidgetInst WHERE WidgetInstId = 10572) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10566) END FROM WidgetInst WHERE WidgetInstId = 10566)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10573;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10572) END FROM WidgetInst WHERE WidgetInstId = 10572) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10566) END FROM WidgetInst WHERE WidgetInstId = 10566)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10575;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10572) END FROM WidgetInst WHERE WidgetInstId = 10572) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10566) END FROM WidgetInst WHERE WidgetInstId = 10566)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10581) END FROM WidgetInst WHERE WidgetInstId = 10581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10581) END FROM WidgetInst WHERE WidgetInstId = 10581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10585;


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 = 10581) END FROM WidgetInst WHERE WidgetInstId = 10581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10581) END FROM WidgetInst WHERE WidgetInstId = 10581) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10605) END FROM WidgetInst WHERE WidgetInstId = 10605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10605) END FROM WidgetInst WHERE WidgetInstId = 10605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10605) END FROM WidgetInst WHERE WidgetInstId = 10605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10605) END FROM WidgetInst WHERE WidgetInstId = 10605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 10627) END FROM WidgetInst WHERE WidgetInstId = 10627) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10627) END FROM WidgetInst WHERE WidgetInstId = 10627) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10627) END FROM WidgetInst WHERE WidgetInstId = 10627) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10627) END FROM WidgetInst WHERE WidgetInstId = 10627) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10627) END FROM WidgetInst WHERE WidgetInstId = 10627) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10627) END FROM WidgetInst WHERE WidgetInstId = 10627) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10638;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10406) END FROM WidgetInst WHERE WidgetInstId = 10406) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 9059) END FROM WidgetInst WHERE WidgetInstId = 9059)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10640;


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 = 10642) END FROM WidgetInst WHERE WidgetInstId = 10642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 10673) END FROM WidgetInst WHERE WidgetInstId = 10673) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10674;


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 = 10673) END FROM WidgetInst WHERE WidgetInstId = 10673) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10676;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10682;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10690;


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 = 10686) END FROM WidgetInst WHERE WidgetInstId = 10686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10692;


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 = 10688) END FROM WidgetInst WHERE WidgetInstId = 10688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10694;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10696;


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 = 10686) END FROM WidgetInst WHERE WidgetInstId = 10686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10698;


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 = 10688) END FROM WidgetInst WHERE WidgetInstId = 10688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10700;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10702;


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 = 10686) END FROM WidgetInst WHERE WidgetInstId = 10686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10704;


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 = 10688) END FROM WidgetInst WHERE WidgetInstId = 10688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10706;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10708;


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 = 10686) END FROM WidgetInst WHERE WidgetInstId = 10686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10710;


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 = 10688) END FROM WidgetInst WHERE WidgetInstId = 10688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10712;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10714;


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 = 10686) END FROM WidgetInst WHERE WidgetInstId = 10686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10688) END FROM WidgetInst WHERE WidgetInstId = 10688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10718;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 10686) END FROM WidgetInst WHERE WidgetInstId = 10686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10722;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 10688) END FROM WidgetInst WHERE WidgetInstId = 10688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10724;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10726;


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 = 10686) END FROM WidgetInst WHERE WidgetInstId = 10686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 10688) END FROM WidgetInst WHERE WidgetInstId = 10688) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10730;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10732;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10736;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10738;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10742;


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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10744;


Query:
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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10748;


Query:
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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10750;


Query:
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 = 10681) END FROM WidgetInst WHERE WidgetInstId = 10681) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 10765) END FROM WidgetInst WHERE WidgetInstId = 10765) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10766;


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 = 10775) END FROM WidgetInst WHERE WidgetInstId = 10775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 10778) END FROM WidgetInst WHERE WidgetInstId = 10778) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 10783) END FROM WidgetInst WHERE WidgetInstId = 10783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 10783) END FROM WidgetInst WHERE WidgetInstId = 10783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10786;


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 = 10775) END FROM WidgetInst WHERE WidgetInstId = 10775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10801;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10815;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10815;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10815;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10815;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10815;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 10815;


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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10816;


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 = 10818) END FROM WidgetInst WHERE WidgetInstId = 10818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10819;


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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2600) END FROM WidgetInst WHERE WidgetInstId = 2600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2600) END FROM WidgetInst WHERE WidgetInstId = 2600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10830;


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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10835) END FROM WidgetInst WHERE WidgetInstId = 10835) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10835) END FROM WidgetInst WHERE WidgetInstId = 10835) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10844) END FROM WidgetInst WHERE WidgetInstId = 10844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10844) END FROM WidgetInst WHERE WidgetInstId = 10844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10844) END FROM WidgetInst WHERE WidgetInstId = 10844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10851;


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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10854;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10856) END FROM WidgetInst WHERE WidgetInstId = 10856)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10858) END FROM WidgetInst WHERE WidgetInstId = 10858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10858) END FROM WidgetInst WHERE WidgetInstId = 10858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10858) END FROM WidgetInst WHERE WidgetInstId = 10858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10858) END FROM WidgetInst WHERE WidgetInstId = 10858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10867;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10856) END FROM WidgetInst WHERE WidgetInstId = 10856)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10858) END FROM WidgetInst WHERE WidgetInstId = 10858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10858) END FROM WidgetInst WHERE WidgetInstId = 10858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10874) END FROM WidgetInst WHERE WidgetInstId = 10874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10858) END FROM WidgetInst WHERE WidgetInstId = 10858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10858) END FROM WidgetInst WHERE WidgetInstId = 10858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10874) END FROM WidgetInst WHERE WidgetInstId = 10874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10858) END FROM WidgetInst WHERE WidgetInstId = 10858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10858) END FROM WidgetInst WHERE WidgetInstId = 10858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10882;


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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10883;


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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10919) END FROM WidgetInst WHERE WidgetInstId = 10919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10919) END FROM WidgetInst WHERE WidgetInstId = 10919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10919) END FROM WidgetInst WHERE WidgetInstId = 10919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10924;


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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10935) END FROM WidgetInst WHERE WidgetInstId = 10935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10935) END FROM WidgetInst WHERE WidgetInstId = 10935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10935) END FROM WidgetInst WHERE WidgetInstId = 10935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10955) END FROM WidgetInst WHERE WidgetInstId = 10955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10955) END FROM WidgetInst WHERE WidgetInstId = 10955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10955) END FROM WidgetInst WHERE WidgetInstId = 10955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10960;


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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10962;


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 = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10976;


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 = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10980;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10981) END FROM WidgetInst WHERE WidgetInstId = 10981) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10982;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10981) END FROM WidgetInst WHERE WidgetInstId = 10981) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10984;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 10981) END FROM WidgetInst WHERE WidgetInstId = 10981) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10975) END FROM WidgetInst WHERE WidgetInstId = 10975)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10986;


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 = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10990) END FROM WidgetInst WHERE WidgetInstId = 10990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10990) END FROM WidgetInst WHERE WidgetInstId = 10990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10994;


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 = 10990) END FROM WidgetInst WHERE WidgetInstId = 10990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10990) END FROM WidgetInst WHERE WidgetInstId = 10990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10815) END FROM WidgetInst WHERE WidgetInstId = 10815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11014) END FROM WidgetInst WHERE WidgetInstId = 11014) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11014) END FROM WidgetInst WHERE WidgetInstId = 11014) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11018;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11014) END FROM WidgetInst WHERE WidgetInstId = 11014) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11014) END FROM WidgetInst WHERE WidgetInstId = 11014) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11032;


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 = 11036) END FROM WidgetInst WHERE WidgetInstId = 11036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11036) END FROM WidgetInst WHERE WidgetInstId = 11036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11036) END FROM WidgetInst WHERE WidgetInstId = 11036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11036) END FROM WidgetInst WHERE WidgetInstId = 11036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11036) END FROM WidgetInst WHERE WidgetInstId = 11036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11036) END FROM WidgetInst WHERE WidgetInstId = 11036) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11047;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 2745) END FROM WidgetInst WHERE WidgetInstId = 2745) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2603) END FROM WidgetInst WHERE WidgetInstId = 2603)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11049;


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 = 11051) END FROM WidgetInst WHERE WidgetInstId = 11051) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11052;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11062;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11062;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11062;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11062;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11062;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11062;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11063;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11063;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11063;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11063;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11063;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11063;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11064;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11064;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11064;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11064;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11064;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11064;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11065;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11065;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11065;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11065;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11065;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 11065;


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 = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11067;


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 = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11069;


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 = 11074) END FROM WidgetInst WHERE WidgetInstId = 11074) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 11075) END FROM WidgetInst WHERE WidgetInstId = 11075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11079;


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 = 11076) END FROM WidgetInst WHERE WidgetInstId = 11076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 11077) END FROM WidgetInst WHERE WidgetInstId = 11077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11081;


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 = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11086;


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 = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11087;


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 = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11088;


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 = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11089;


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 = 10670) END FROM WidgetInst WHERE WidgetInstId = 10670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11110;


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 = 10670) END FROM WidgetInst WHERE WidgetInstId = 10670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11111;


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 = 10670) END FROM WidgetInst WHERE WidgetInstId = 10670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11112;


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 = 10670) END FROM WidgetInst WHERE WidgetInstId = 10670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11113;


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 = 10670) END FROM WidgetInst WHERE WidgetInstId = 10670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11122;


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 = 10670) END FROM WidgetInst WHERE WidgetInstId = 10670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11123;


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 = 10670) END FROM WidgetInst WHERE WidgetInstId = 10670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11124;


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 = 10670) END FROM WidgetInst WHERE WidgetInstId = 10670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11125;


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 = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11134;


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 = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11135;


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 = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11136;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11137;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11142) END FROM WidgetInst WHERE WidgetInstId = 11142) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11143) END FROM WidgetInst WHERE WidgetInstId = 11143) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11144) END FROM WidgetInst WHERE WidgetInstId = 11144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11145) END FROM WidgetInst WHERE WidgetInstId = 11145) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11142) END FROM WidgetInst WHERE WidgetInstId = 11142) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11143) END FROM WidgetInst WHERE WidgetInstId = 11143) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11144) END FROM WidgetInst WHERE WidgetInstId = 11144) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11145) END FROM WidgetInst WHERE WidgetInstId = 11145) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11161;


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 = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11170;


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 = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11171;


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 = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11172;


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 = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11178) END FROM WidgetInst WHERE WidgetInstId = 11178) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11179) END FROM WidgetInst WHERE WidgetInstId = 11179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11180) END FROM WidgetInst WHERE WidgetInstId = 11180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11181) END FROM WidgetInst WHERE WidgetInstId = 11181) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11178) END FROM WidgetInst WHERE WidgetInstId = 11178) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11179) END FROM WidgetInst WHERE WidgetInstId = 11179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11180) END FROM WidgetInst WHERE WidgetInstId = 11180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11181) END FROM WidgetInst WHERE WidgetInstId = 11181) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11178) END FROM WidgetInst WHERE WidgetInstId = 11178) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11179) END FROM WidgetInst WHERE WidgetInstId = 11179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11180) END FROM WidgetInst WHERE WidgetInstId = 11180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11181) END FROM WidgetInst WHERE WidgetInstId = 11181) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11209;


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 = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11218;


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 = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11220;


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 = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11221;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11226) END FROM WidgetInst WHERE WidgetInstId = 11226)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11238;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11227) END FROM WidgetInst WHERE WidgetInstId = 11227)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11239;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11228) END FROM WidgetInst WHERE WidgetInstId = 11228)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11240;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11229) END FROM WidgetInst WHERE WidgetInstId = 11229)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11234) END FROM WidgetInst WHERE WidgetInstId = 11234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11235) END FROM WidgetInst WHERE WidgetInstId = 11235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11236) END FROM WidgetInst WHERE WidgetInstId = 11236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11237) END FROM WidgetInst WHERE WidgetInstId = 11237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11234) END FROM WidgetInst WHERE WidgetInstId = 11234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11235) END FROM WidgetInst WHERE WidgetInstId = 11235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11236) END FROM WidgetInst WHERE WidgetInstId = 11236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11237) END FROM WidgetInst WHERE WidgetInstId = 11237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11234) END FROM WidgetInst WHERE WidgetInstId = 11234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11235) END FROM WidgetInst WHERE WidgetInstId = 11235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11236) END FROM WidgetInst WHERE WidgetInstId = 11236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11237) END FROM WidgetInst WHERE WidgetInstId = 11237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11234) END FROM WidgetInst WHERE WidgetInstId = 11234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11235) END FROM WidgetInst WHERE WidgetInstId = 11235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11236) END FROM WidgetInst WHERE WidgetInstId = 11236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11237) END FROM WidgetInst WHERE WidgetInstId = 11237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11273;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11226) END FROM WidgetInst WHERE WidgetInstId = 11226)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11274;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11227) END FROM WidgetInst WHERE WidgetInstId = 11227)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11275;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11228) END FROM WidgetInst WHERE WidgetInstId = 11228)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11276;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11229) END FROM WidgetInst WHERE WidgetInstId = 11229)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11234) END FROM WidgetInst WHERE WidgetInstId = 11234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11286;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11235) END FROM WidgetInst WHERE WidgetInstId = 11235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11236) END FROM WidgetInst WHERE WidgetInstId = 11236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11288;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11237) END FROM WidgetInst WHERE WidgetInstId = 11237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11234) END FROM WidgetInst WHERE WidgetInstId = 11234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11235) END FROM WidgetInst WHERE WidgetInstId = 11235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11236) END FROM WidgetInst WHERE WidgetInstId = 11236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11237) END FROM WidgetInst WHERE WidgetInstId = 11237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11298) END FROM WidgetInst WHERE WidgetInstId = 11298) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11302;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11299) END FROM WidgetInst WHERE WidgetInstId = 11299) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11300) END FROM WidgetInst WHERE WidgetInstId = 11300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11301) END FROM WidgetInst WHERE WidgetInstId = 11301) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11234) END FROM WidgetInst WHERE WidgetInstId = 11234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11235) END FROM WidgetInst WHERE WidgetInstId = 11235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11236) END FROM WidgetInst WHERE WidgetInstId = 11236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11237) END FROM WidgetInst WHERE WidgetInstId = 11237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11234) END FROM WidgetInst WHERE WidgetInstId = 11234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11235) END FROM WidgetInst WHERE WidgetInstId = 11235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11236) END FROM WidgetInst WHERE WidgetInstId = 11236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11237) END FROM WidgetInst WHERE WidgetInstId = 11237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11298) END FROM WidgetInst WHERE WidgetInstId = 11298) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11299) END FROM WidgetInst WHERE WidgetInstId = 11299) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11300) END FROM WidgetInst WHERE WidgetInstId = 11300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11301) END FROM WidgetInst WHERE WidgetInstId = 11301) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11234) END FROM WidgetInst WHERE WidgetInstId = 11234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11235) END FROM WidgetInst WHERE WidgetInstId = 11235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11327;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11236) END FROM WidgetInst WHERE WidgetInstId = 11236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11328;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11237) END FROM WidgetInst WHERE WidgetInstId = 11237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11234) END FROM WidgetInst WHERE WidgetInstId = 11234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11330;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11235) END FROM WidgetInst WHERE WidgetInstId = 11235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11236) END FROM WidgetInst WHERE WidgetInstId = 11236) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11332;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11237) END FROM WidgetInst WHERE WidgetInstId = 11237) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11335;


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 = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11336;


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 = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11337;


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 = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11346;


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 = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11347;


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 = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11348;


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 = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11478) END FROM WidgetInst WHERE WidgetInstId = 11478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11479) END FROM WidgetInst WHERE WidgetInstId = 11479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11480) END FROM WidgetInst WHERE WidgetInstId = 11480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11481) END FROM WidgetInst WHERE WidgetInstId = 11481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11478) END FROM WidgetInst WHERE WidgetInstId = 11478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11479) END FROM WidgetInst WHERE WidgetInstId = 11479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11480) END FROM WidgetInst WHERE WidgetInstId = 11480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11481) END FROM WidgetInst WHERE WidgetInstId = 11481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11478) END FROM WidgetInst WHERE WidgetInstId = 11478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11479) END FROM WidgetInst WHERE WidgetInstId = 11479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11480) END FROM WidgetInst WHERE WidgetInstId = 11480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11500;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11481) END FROM WidgetInst WHERE WidgetInstId = 11481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11508;


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 = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11542) END FROM WidgetInst WHERE WidgetInstId = 11542) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11543) END FROM WidgetInst WHERE WidgetInstId = 11543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11544) END FROM WidgetInst WHERE WidgetInstId = 11544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11545) END FROM WidgetInst WHERE WidgetInstId = 11545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11542) END FROM WidgetInst WHERE WidgetInstId = 11542) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11543) END FROM WidgetInst WHERE WidgetInstId = 11543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11544) END FROM WidgetInst WHERE WidgetInstId = 11544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11545) END FROM WidgetInst WHERE WidgetInstId = 11545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11542) END FROM WidgetInst WHERE WidgetInstId = 11542) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11543) END FROM WidgetInst WHERE WidgetInstId = 11543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11544) END FROM WidgetInst WHERE WidgetInstId = 11544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11545) END FROM WidgetInst WHERE WidgetInstId = 11545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 11062) END FROM WidgetInst WHERE WidgetInstId = 11062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 11063) END FROM WidgetInst WHERE WidgetInstId = 11063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11571;


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 = 11064) END FROM WidgetInst WHERE WidgetInstId = 11064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11572;


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 = 11065) END FROM WidgetInst WHERE WidgetInstId = 11065) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11622) END FROM WidgetInst WHERE WidgetInstId = 11622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11623) END FROM WidgetInst WHERE WidgetInstId = 11623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11624) END FROM WidgetInst WHERE WidgetInstId = 11624) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11625) END FROM WidgetInst WHERE WidgetInstId = 11625) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11622) END FROM WidgetInst WHERE WidgetInstId = 11622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11623) END FROM WidgetInst WHERE WidgetInstId = 11623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11624) END FROM WidgetInst WHERE WidgetInstId = 11624) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11625) END FROM WidgetInst WHERE WidgetInstId = 11625) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11622) END FROM WidgetInst WHERE WidgetInstId = 11622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11623) END FROM WidgetInst WHERE WidgetInstId = 11623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11643;


