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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 6867) END FROM WidgetInst WHERE WidgetInstId = 6867) = 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 = '(none selected)' AND WidgetInstId = 6867) END FROM WidgetInst WHERE WidgetInstId = 6867) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7304;


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 = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7311;


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 = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7312;


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 = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7313;


Query:
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 = 7317) END FROM WidgetInst WHERE WidgetInstId = 7317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7320;


Query:
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 = 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 = 'Constant' AND WidgetInstId = 7319) END FROM WidgetInst WHERE WidgetInstId = 7319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7317) END FROM WidgetInst WHERE WidgetInstId = 7317) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7318) END FROM WidgetInst WHERE WidgetInstId = 7318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7330;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7319) END FROM WidgetInst WHERE WidgetInstId = 7319) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7331;


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 = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7338;


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 = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) = 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 TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7340;


Query:
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 = 7344) END FROM WidgetInst WHERE WidgetInstId = 7344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7347;


Query:
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 = 7345) END FROM WidgetInst WHERE WidgetInstId = 7345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7348;


Query:
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 = 7346) END FROM WidgetInst WHERE WidgetInstId = 7346) = 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 = 'Time Series' AND WidgetInstId = 7344) END FROM WidgetInst WHERE WidgetInstId = 7344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7345) END FROM WidgetInst WHERE WidgetInstId = 7345) = 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 = 'Time Series' AND WidgetInstId = 7346) END FROM WidgetInst WHERE WidgetInstId = 7346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7344) END FROM WidgetInst WHERE WidgetInstId = 7344) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7345) END FROM WidgetInst WHERE WidgetInstId = 7345) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7346) END FROM WidgetInst WHERE WidgetInstId = 7346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7367;


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 = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) = 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 = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7375;


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 = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7376;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7380) END FROM WidgetInst WHERE WidgetInstId = 7380)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7389;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7381) END FROM WidgetInst WHERE WidgetInstId = 7381)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7390;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7382) END FROM WidgetInst WHERE WidgetInstId = 7382)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7386) END FROM WidgetInst WHERE WidgetInstId = 7386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7387) END FROM WidgetInst WHERE WidgetInstId = 7387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7388) END FROM WidgetInst WHERE WidgetInstId = 7388) = 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 = 'Metric' AND WidgetInstId = 7386) END FROM WidgetInst WHERE WidgetInstId = 7386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7387) END FROM WidgetInst WHERE WidgetInstId = 7387) = 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 = 'Metric' AND WidgetInstId = 7388) END FROM WidgetInst WHERE WidgetInstId = 7388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7386) END FROM WidgetInst WHERE WidgetInstId = 7386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7387) END FROM WidgetInst WHERE WidgetInstId = 7387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7388) END FROM WidgetInst WHERE WidgetInstId = 7388) = 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 = 'Metric' AND WidgetInstId = 7386) END FROM WidgetInst WHERE WidgetInstId = 7386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7387) END FROM WidgetInst WHERE WidgetInstId = 7387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7388) END FROM WidgetInst WHERE WidgetInstId = 7388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7415;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7380) END FROM WidgetInst WHERE WidgetInstId = 7380)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7416;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7381) END FROM WidgetInst WHERE WidgetInstId = 7381)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7417;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7382) END FROM WidgetInst WHERE WidgetInstId = 7382)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7386) END FROM WidgetInst WHERE WidgetInstId = 7386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7387) END FROM WidgetInst WHERE WidgetInstId = 7387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7388) END FROM WidgetInst WHERE WidgetInstId = 7388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7386) END FROM WidgetInst WHERE WidgetInstId = 7386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7387) END FROM WidgetInst WHERE WidgetInstId = 7387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7388) END FROM WidgetInst WHERE WidgetInstId = 7388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7434) END FROM WidgetInst WHERE WidgetInstId = 7434) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7435) END FROM WidgetInst WHERE WidgetInstId = 7435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7436) END FROM WidgetInst WHERE WidgetInstId = 7436) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7386) END FROM WidgetInst WHERE WidgetInstId = 7386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7387) END FROM WidgetInst WHERE WidgetInstId = 7387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7388) END FROM WidgetInst WHERE WidgetInstId = 7388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7386) END FROM WidgetInst WHERE WidgetInstId = 7386) = 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 = 'Metric' AND WidgetInstId = 7387) END FROM WidgetInst WHERE WidgetInstId = 7387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7388) END FROM WidgetInst WHERE WidgetInstId = 7388) = 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 = 'Rating Curve' AND WidgetInstId = 7434) END FROM WidgetInst WHERE WidgetInstId = 7434) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7435) END FROM WidgetInst WHERE WidgetInstId = 7435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7436) END FROM WidgetInst WHERE WidgetInstId = 7436) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7386) END FROM WidgetInst WHERE WidgetInstId = 7386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7387) END FROM WidgetInst WHERE WidgetInstId = 7387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7388) END FROM WidgetInst WHERE WidgetInstId = 7388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7457;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7386) END FROM WidgetInst WHERE WidgetInstId = 7386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7387) END FROM WidgetInst WHERE WidgetInstId = 7387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7388) END FROM WidgetInst WHERE WidgetInstId = 7388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7460;


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 = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7461;


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 = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7463;


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 = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) = 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 = 'Culvert' AND WidgetInstId = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7471;


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 = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) = 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 = 'user' AND WidgetInstId = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7570) END FROM WidgetInst WHERE WidgetInstId = 7570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7571) END FROM WidgetInst WHERE WidgetInstId = 7571) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7586;


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 = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7590;


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 = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) = 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 = 'Weir' AND WidgetInstId = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7617) END FROM WidgetInst WHERE WidgetInstId = 7617) = 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 = 'user' AND WidgetInstId = 7618) END FROM WidgetInst WHERE WidgetInstId = 7618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7619) END FROM WidgetInst WHERE WidgetInstId = 7619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7622;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7617) END FROM WidgetInst WHERE WidgetInstId = 7617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7618) END FROM WidgetInst WHERE WidgetInstId = 7618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7619) END FROM WidgetInst WHERE WidgetInstId = 7619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7617) END FROM WidgetInst WHERE WidgetInstId = 7617) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7618) END FROM WidgetInst WHERE WidgetInstId = 7618) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7619) END FROM WidgetInst WHERE WidgetInstId = 7619) = 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 = 'Gate' AND WidgetInstId = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) = 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 = 'Gate' AND WidgetInstId = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7639;


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 = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) = 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 = 'user' AND WidgetInstId = 7677) END FROM WidgetInst WHERE WidgetInstId = 7677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7678) END FROM WidgetInst WHERE WidgetInstId = 7678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7679) END FROM WidgetInst WHERE WidgetInstId = 7679) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7677) END FROM WidgetInst WHERE WidgetInstId = 7677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7686;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7678) END FROM WidgetInst WHERE WidgetInstId = 7678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7687;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7679) END FROM WidgetInst WHERE WidgetInstId = 7679) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7688;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7677) END FROM WidgetInst WHERE WidgetInstId = 7677) = 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 = 7678) END FROM WidgetInst WHERE WidgetInstId = 7678) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7693;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7679) END FROM WidgetInst WHERE WidgetInstId = 7679) = 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 = 'Pressure' AND WidgetInstId = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) = 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 = 'Pressure' AND WidgetInstId = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7699;


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 = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7700;


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 = 7737) END FROM WidgetInst WHERE WidgetInstId = 7737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7740;


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 = 7738) END FROM WidgetInst WHERE WidgetInstId = 7738) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7741;


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 = 7739) END FROM WidgetInst WHERE WidgetInstId = 7739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7742;


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 = 7737) END FROM WidgetInst WHERE WidgetInstId = 7737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7746;


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 = 7738) END FROM WidgetInst WHERE WidgetInstId = 7738) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7747;


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 = 7739) END FROM WidgetInst WHERE WidgetInstId = 7739) = 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 = 7737) END FROM WidgetInst WHERE WidgetInstId = 7737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7752;


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 = 7738) END FROM WidgetInst WHERE WidgetInstId = 7738) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7753;


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 = 7739) END FROM WidgetInst WHERE WidgetInstId = 7739) = 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 = 7755) END FROM WidgetInst WHERE WidgetInstId = 7755) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7737) END FROM WidgetInst WHERE WidgetInstId = 7737)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7758;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7756) END FROM WidgetInst WHERE WidgetInstId = 7756) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7738) END FROM WidgetInst WHERE WidgetInstId = 7738)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7759;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7757) END FROM WidgetInst WHERE WidgetInstId = 7757) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7739) END FROM WidgetInst WHERE WidgetInstId = 7739)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7760;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7755) END FROM WidgetInst WHERE WidgetInstId = 7755) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7737) END FROM WidgetInst WHERE WidgetInstId = 7737)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7764;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7756) END FROM WidgetInst WHERE WidgetInstId = 7756) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7738) END FROM WidgetInst WHERE WidgetInstId = 7738)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7765;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7757) END FROM WidgetInst WHERE WidgetInstId = 7757) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7739) END FROM WidgetInst WHERE WidgetInstId = 7739)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7766;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7755) END FROM WidgetInst WHERE WidgetInstId = 7755) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7737) END FROM WidgetInst WHERE WidgetInstId = 7737)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7770;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7756) END FROM WidgetInst WHERE WidgetInstId = 7756) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7738) END FROM WidgetInst WHERE WidgetInstId = 7738)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7771;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7757) END FROM WidgetInst WHERE WidgetInstId = 7757) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7739) END FROM WidgetInst WHERE WidgetInstId = 7739)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7772;


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 = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7776;


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 = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7777;


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 = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7778;


Query:
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 = 7782) END FROM WidgetInst WHERE WidgetInstId = 7782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7785;


Query:
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 = 7783) END FROM WidgetInst WHERE WidgetInstId = 7783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7786;


Query:
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 = 7784) END FROM WidgetInst WHERE WidgetInstId = 7784) = 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 = 7782) END FROM WidgetInst WHERE WidgetInstId = 7782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7783) END FROM WidgetInst WHERE WidgetInstId = 7783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7784) END FROM WidgetInst WHERE WidgetInstId = 7784) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7796;


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 = 7782) END FROM WidgetInst WHERE WidgetInstId = 7782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7803;


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 = 7783) END FROM WidgetInst WHERE WidgetInstId = 7783) = 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 = 'Weir' AND WidgetInstId = 7784) END FROM WidgetInst WHERE WidgetInstId = 7784) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 7782) END FROM WidgetInst WHERE WidgetInstId = 7782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 7783) END FROM WidgetInst WHERE WidgetInstId = 7783) = 1 THEN 1 ELSE 0 END WHERE 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 = 'Rating curve' AND WidgetInstId = 7784) END FROM WidgetInst WHERE WidgetInstId = 7784) = 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 = 'Link' AND WidgetInstId = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7845;


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 = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7846;


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 = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7847;


Query:
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 = 7854) END FROM WidgetInst WHERE WidgetInstId = 7854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7857;


Query:
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 = 7855) END FROM WidgetInst WHERE WidgetInstId = 7855) = 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 = 'Constant' AND WidgetInstId = 7856) END FROM WidgetInst WHERE WidgetInstId = 7856) = 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 = 'Time Series' AND WidgetInstId = 7854) END FROM WidgetInst WHERE WidgetInstId = 7854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7855) END FROM WidgetInst WHERE WidgetInstId = 7855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7856) END FROM WidgetInst WHERE WidgetInstId = 7856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7868;


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 = 7854) END FROM WidgetInst WHERE WidgetInstId = 7854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7875;


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 = 7855) END FROM WidgetInst WHERE WidgetInstId = 7855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7876;


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 = 7856) END FROM WidgetInst WHERE WidgetInstId = 7856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 7854) END FROM WidgetInst WHERE WidgetInstId = 7854) = 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 = 'Rating curve' AND WidgetInstId = 7855) END FROM WidgetInst WHERE WidgetInstId = 7855) = 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 = 'Rating curve' AND WidgetInstId = 7856) END FROM WidgetInst WHERE WidgetInstId = 7856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7910;


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 = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7923;


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 = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7924;


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 = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 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 = 'Computed' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 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 = 'Computed' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 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 = 'Computed' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 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 = 'Computed' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7920) END FROM WidgetInst WHERE WidgetInstId = 7920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7921) END FROM WidgetInst WHERE WidgetInstId = 7921) = 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 = 'Computed' AND WidgetInstId = 7922) END FROM WidgetInst WHERE WidgetInstId = 7922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7955;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7257) END FROM WidgetInst WHERE WidgetInstId = 7257) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 6870) END FROM WidgetInst WHERE WidgetInstId = 6870)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7959;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7258) END FROM WidgetInst WHERE WidgetInstId = 7258) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 6870) END FROM WidgetInst WHERE WidgetInstId = 6870)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7960;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 7259) END FROM WidgetInst WHERE WidgetInstId = 7259) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 6870) END FROM WidgetInst WHERE WidgetInstId = 6870)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7961;


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 = 7965) END FROM WidgetInst WHERE WidgetInstId = 7965) = 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 = 'File' AND WidgetInstId = 7966) END FROM WidgetInst WHERE WidgetInstId = 7966) = 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 = 'File' AND WidgetInstId = 7967) END FROM WidgetInst WHERE WidgetInstId = 7967) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7970;


Query:
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 = 7975) END FROM WidgetInst WHERE WidgetInstId = 7975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 7975) END FROM WidgetInst WHERE WidgetInstId = 7975) = 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 = 'Constant' AND WidgetInstId = 7986) END FROM WidgetInst WHERE WidgetInstId = 7986) = 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 = 'Constant' AND WidgetInstId = 7987) END FROM WidgetInst WHERE WidgetInstId = 7987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7993;


Query:
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 = 7988) END FROM WidgetInst WHERE WidgetInstId = 7988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7994;


Query:
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 = 7989) END FROM WidgetInst WHERE WidgetInstId = 7989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7995;


Query:
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 = 7990) END FROM WidgetInst WHERE WidgetInstId = 7990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7996;


Query:
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 = 7991) END FROM WidgetInst WHERE WidgetInstId = 7991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 7986) END FROM WidgetInst WHERE WidgetInstId = 7986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 7987) END FROM WidgetInst WHERE WidgetInstId = 7987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 7988) END FROM WidgetInst WHERE WidgetInstId = 7988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 7989) END FROM WidgetInst WHERE WidgetInstId = 7989) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8007;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 7990) END FROM WidgetInst WHERE WidgetInstId = 7990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 7991) END FROM WidgetInst WHERE WidgetInstId = 7991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8009;


Query:
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 = 8017) END FROM WidgetInst WHERE WidgetInstId = 8017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8018;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 8017) END FROM WidgetInst WHERE WidgetInstId = 8017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8020;


Query:
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 = 8027) END FROM WidgetInst WHERE WidgetInstId = 8027) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8032;


Query:
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 = 8028) END FROM WidgetInst WHERE WidgetInstId = 8028) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8033;


Query:
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 = 8029) END FROM WidgetInst WHERE WidgetInstId = 8029) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8034;


Query:
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 = 8030) END FROM WidgetInst WHERE WidgetInstId = 8030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8035;


Query:
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 = 8031) END FROM WidgetInst WHERE WidgetInstId = 8031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 8027) END FROM WidgetInst WHERE WidgetInstId = 8027) = 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 = 'Depth Varied' AND WidgetInstId = 8028) END FROM WidgetInst WHERE WidgetInstId = 8028) = 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 = 'Depth Varied' AND WidgetInstId = 8029) END FROM WidgetInst WHERE WidgetInstId = 8029) = 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 = 'Depth Varied' AND WidgetInstId = 8030) END FROM WidgetInst WHERE WidgetInstId = 8030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 8031) END FROM WidgetInst WHERE WidgetInstId = 8031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8046;


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 = 8056) END FROM WidgetInst WHERE WidgetInstId = 8056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8057;


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 = 8056) END FROM WidgetInst WHERE WidgetInstId = 8056) = 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 = 'Mixed' AND WidgetInstId = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 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 = 'Parker' AND WidgetInstId = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8073;


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 = 8069) END FROM WidgetInst WHERE WidgetInstId = 8069) = 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 = 'Parker' AND WidgetInstId = 8071) END FROM WidgetInst WHERE WidgetInstId = 8071) = 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 = 'Parker' AND WidgetInstId = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8079;


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 = 8069) END FROM WidgetInst WHERE WidgetInstId = 8069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8081;


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 = 8071) END FROM WidgetInst WHERE WidgetInstId = 8071) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 8069) END FROM WidgetInst WHERE WidgetInstId = 8069) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 8071) END FROM WidgetInst WHERE WidgetInstId = 8071) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 8069) END FROM WidgetInst WHERE WidgetInstId = 8069) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 8071) END FROM WidgetInst WHERE WidgetInstId = 8071) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8095;


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 = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8097;


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 = 8069) END FROM WidgetInst WHERE WidgetInstId = 8069) = 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 = 'Wilcock-Crowe' AND WidgetInstId = 8071) END FROM WidgetInst WHERE WidgetInstId = 8071) = 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 = 'Wu-et-al' AND WidgetInstId = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 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 = 'Wu-et-al' AND WidgetInstId = 8069) END FROM WidgetInst WHERE WidgetInstId = 8069) = 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 = 'Wu-et-al' AND WidgetInstId = 8071) END FROM WidgetInst WHERE WidgetInstId = 8071) = 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 = 'Meyer-Peter-Muller' AND WidgetInstId = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 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 = 'Meyer-Peter-Muller' AND WidgetInstId = 8069) END FROM WidgetInst WHERE WidgetInstId = 8069) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8111;


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 = 8071) END FROM WidgetInst WHERE WidgetInstId = 8071) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8113;


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 = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8115;


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 = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8117;


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 = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 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 = 'Aw' AND WidgetInstId = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 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 = 'Rijn' AND WidgetInstId = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8123;


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 = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8125;


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 = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8127;


Query:
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 = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8129;


Query:
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 = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8131;


Query:
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 = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8133;


Query:
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 = 8064) END FROM WidgetInst WHERE WidgetInstId = 8064) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8135;


Query:
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 = 8148) END FROM WidgetInst WHERE WidgetInstId = 8148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8149;


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 = 8158) END FROM WidgetInst WHERE WidgetInstId = 8158) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8159;


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 = 8161) END FROM WidgetInst WHERE WidgetInstId = 8161) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8162;


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 = 8166) END FROM WidgetInst WHERE WidgetInstId = 8166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8167;


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 = 8166) END FROM WidgetInst WHERE WidgetInstId = 8166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8169;


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 = 8158) END FROM WidgetInst WHERE WidgetInstId = 8158) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8184;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 8198;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 8198;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 8198;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 8198;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 8198;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 8198;


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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8199;


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 = 8201) END FROM WidgetInst WHERE WidgetInstId = 8201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8202;


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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 44) END FROM WidgetInst WHERE WidgetInstId = 44) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 44) END FROM WidgetInst WHERE WidgetInstId = 44) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8213;


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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8216;


Query:
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 = 8218) END FROM WidgetInst WHERE WidgetInstId = 8218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8218) END FROM WidgetInst WHERE WidgetInstId = 8218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8222;


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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8225;


Query:
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 = 8227) END FROM WidgetInst WHERE WidgetInstId = 8227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8227) END FROM WidgetInst WHERE WidgetInstId = 8227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8227) END FROM WidgetInst WHERE WidgetInstId = 8227) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8234;


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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8237;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8239) END FROM WidgetInst WHERE WidgetInstId = 8239)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8241) END FROM WidgetInst WHERE WidgetInstId = 8241) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8241) END FROM WidgetInst WHERE WidgetInstId = 8241) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8246;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8241) END FROM WidgetInst WHERE WidgetInstId = 8241) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8241) END FROM WidgetInst WHERE WidgetInstId = 8241) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8250;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8239) END FROM WidgetInst WHERE WidgetInstId = 8239)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8241) END FROM WidgetInst WHERE WidgetInstId = 8241) = 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 = 'Metric' AND WidgetInstId = 8241) END FROM WidgetInst WHERE WidgetInstId = 8241) = 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 = 'Time Series' AND WidgetInstId = 8257) END FROM WidgetInst WHERE WidgetInstId = 8257) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8241) END FROM WidgetInst WHERE WidgetInstId = 8241) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8241) END FROM WidgetInst WHERE WidgetInstId = 8241) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8257) END FROM WidgetInst WHERE WidgetInstId = 8257) = 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 = 'U.S. Customary' AND WidgetInstId = 8241) END FROM WidgetInst WHERE WidgetInstId = 8241) = 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 = 'Metric' AND WidgetInstId = 8241) END FROM WidgetInst WHERE WidgetInstId = 8241) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8266;


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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8302) END FROM WidgetInst WHERE WidgetInstId = 8302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8302) END FROM WidgetInst WHERE WidgetInstId = 8302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8302) END FROM WidgetInst WHERE WidgetInstId = 8302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8307;


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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8318) END FROM WidgetInst WHERE WidgetInstId = 8318) = 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 = 8318) END FROM WidgetInst WHERE WidgetInstId = 8318) = 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 = 8318) END FROM WidgetInst WHERE WidgetInstId = 8318) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8323;


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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8338) END FROM WidgetInst WHERE WidgetInstId = 8338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8338) END FROM WidgetInst WHERE WidgetInstId = 8338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8338) END FROM WidgetInst WHERE WidgetInstId = 8338) = 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 = 'Pressure' AND WidgetInstId = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 8358) END FROM WidgetInst WHERE WidgetInstId = 8358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8359;


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 = 8358) END FROM WidgetInst WHERE WidgetInstId = 8358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8361;


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 = 8358) END FROM WidgetInst WHERE WidgetInstId = 8358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8363;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8364) END FROM WidgetInst WHERE WidgetInstId = 8364) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8358) END FROM WidgetInst WHERE WidgetInstId = 8358)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8365;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8364) END FROM WidgetInst WHERE WidgetInstId = 8364) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8358) END FROM WidgetInst WHERE WidgetInstId = 8358)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8367;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8364) END FROM WidgetInst WHERE WidgetInstId = 8364) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8358) END FROM WidgetInst WHERE WidgetInstId = 8358)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8369;


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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8371;


Query:
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 = 8373) END FROM WidgetInst WHERE WidgetInstId = 8373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8373) END FROM WidgetInst WHERE WidgetInstId = 8373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8377;


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 = 8373) END FROM WidgetInst WHERE WidgetInstId = 8373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8373) END FROM WidgetInst WHERE WidgetInstId = 8373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8391;


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 = 8198) END FROM WidgetInst WHERE WidgetInstId = 8198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8394;


Query:
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 = 8397) END FROM WidgetInst WHERE WidgetInstId = 8397) = 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 = 'Time Series' 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 = 'Weir' AND WidgetInstId = 8397) END FROM WidgetInst WHERE WidgetInstId = 8397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8397) END FROM WidgetInst WHERE WidgetInstId = 8397) = 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 = 'Specified' AND WidgetInstId = 8419) END FROM WidgetInst WHERE WidgetInstId = 8419) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8419) END FROM WidgetInst WHERE WidgetInstId = 8419) = 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 = 'Computed' AND WidgetInstId = 8419) END FROM WidgetInst WHERE WidgetInstId = 8419) = 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 = 'Computed' AND WidgetInstId = 8419) END FROM WidgetInst WHERE WidgetInstId = 8419) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8419) END FROM WidgetInst WHERE WidgetInstId = 8419) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8419) END FROM WidgetInst WHERE WidgetInstId = 8419) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 189) END FROM WidgetInst WHERE WidgetInstId = 189) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 47) END FROM WidgetInst WHERE WidgetInstId = 47)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8432;


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 = 8434) END FROM WidgetInst WHERE WidgetInstId = 8434) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8435;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 8447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 8447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 8447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 8447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 8447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 8447;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 8448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 8448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 8448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 8448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 8448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 8448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 8449;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 8449;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 8449;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 8449;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 8449;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 288)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 8449;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8452;


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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8453;


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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8454;


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 = 8462) END FROM WidgetInst WHERE WidgetInstId = 8462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8467;


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 = 8463) END FROM WidgetInst WHERE WidgetInstId = 8463) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8468;


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 = 8464) END FROM WidgetInst WHERE WidgetInstId = 8464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8469;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8477;


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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 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 TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 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 TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8053) END FROM WidgetInst WHERE WidgetInstId = 8053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8053) END FROM WidgetInst WHERE WidgetInstId = 8053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8053) END FROM WidgetInst WHERE WidgetInstId = 8053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8053) END FROM WidgetInst WHERE WidgetInstId = 8053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8053) END FROM WidgetInst WHERE WidgetInstId = 8053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8053) END FROM WidgetInst WHERE WidgetInstId = 8053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8524;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8537;


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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 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 = 8547) END FROM WidgetInst WHERE WidgetInstId = 8547) = 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 = 'Constant' AND WidgetInstId = 8548) END FROM WidgetInst WHERE WidgetInstId = 8548) = 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 = 'Constant' AND WidgetInstId = 8549) END FROM WidgetInst WHERE WidgetInstId = 8549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8547) END FROM WidgetInst WHERE WidgetInstId = 8547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8548) END FROM WidgetInst WHERE WidgetInstId = 8548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8549) END FROM WidgetInst WHERE WidgetInstId = 8549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8569;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8582;


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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8583;


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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8584;


Query:
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 = 8592) END FROM WidgetInst WHERE WidgetInstId = 8592) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8597;


Query:
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 = 8593) END FROM WidgetInst WHERE WidgetInstId = 8593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8598;


Query:
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 = 8594) END FROM WidgetInst WHERE WidgetInstId = 8594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8592) END FROM WidgetInst WHERE WidgetInstId = 8592) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8593) END FROM WidgetInst WHERE WidgetInstId = 8593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8594) END FROM WidgetInst WHERE WidgetInstId = 8594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8592) END FROM WidgetInst WHERE WidgetInstId = 8592) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8593) END FROM WidgetInst WHERE WidgetInstId = 8593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8594) END FROM WidgetInst WHERE WidgetInstId = 8594) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8629;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8642;


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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8643;


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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8644;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8652) END FROM WidgetInst WHERE WidgetInstId = 8652)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8667;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8653) END FROM WidgetInst WHERE WidgetInstId = 8653)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8668;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8654) END FROM WidgetInst WHERE WidgetInstId = 8654)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8663) END FROM WidgetInst WHERE WidgetInstId = 8663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8687;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8663) END FROM WidgetInst WHERE WidgetInstId = 8663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8688;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 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 = 'U.S. Customary' AND WidgetInstId = 8663) END FROM WidgetInst WHERE WidgetInstId = 8663) = 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 = 'U.S. Customary' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 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 = 'Metric' AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8663) END FROM WidgetInst WHERE WidgetInstId = 8663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8708;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8709;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8652) END FROM WidgetInst WHERE WidgetInstId = 8652)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8712;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8653) END FROM WidgetInst WHERE WidgetInstId = 8653)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8713;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8654) END FROM WidgetInst WHERE WidgetInstId = 8654)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8663) END FROM WidgetInst WHERE WidgetInstId = 8663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 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 = 'Metric' AND WidgetInstId = 8663) END FROM WidgetInst WHERE WidgetInstId = 8663) = 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 = 'Metric' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8742) END FROM WidgetInst WHERE WidgetInstId = 8742) = 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 = 'Time Series' AND WidgetInstId = 8743) END FROM WidgetInst WHERE WidgetInstId = 8743) = 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 = 'Time Series' AND WidgetInstId = 8744) END FROM WidgetInst WHERE WidgetInstId = 8744) = 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 = 'U.S. Customary' AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 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 = 'U.S. Customary' AND WidgetInstId = 8663) END FROM WidgetInst WHERE WidgetInstId = 8663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 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 = 'Metric' AND WidgetInstId = 8663) END FROM WidgetInst WHERE WidgetInstId = 8663) = 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 = 'Metric' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 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 = 'Rating Curve' AND WidgetInstId = 8742) END FROM WidgetInst WHERE WidgetInstId = 8742) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8743) END FROM WidgetInst WHERE WidgetInstId = 8743) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8744) END FROM WidgetInst WHERE WidgetInstId = 8744) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8663) END FROM WidgetInst WHERE WidgetInstId = 8663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 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 = 'Metric' AND WidgetInstId = 8663) END FROM WidgetInst WHERE WidgetInstId = 8663) = 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 = 'Metric' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8787;


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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8788;


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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8789;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8802;


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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8803;


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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 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 = 'user' AND WidgetInstId = 8967) END FROM WidgetInst WHERE WidgetInstId = 8967) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8968) END FROM WidgetInst WHERE WidgetInstId = 8968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 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 = 'user' AND WidgetInstId = 8967) END FROM WidgetInst WHERE WidgetInstId = 8967) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8968) END FROM WidgetInst WHERE WidgetInstId = 8968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8983;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8984;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8967) END FROM WidgetInst WHERE WidgetInstId = 8967) = 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 = 'user' AND WidgetInstId = 8968) END FROM WidgetInst WHERE WidgetInstId = 8968) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8969) END FROM WidgetInst WHERE WidgetInstId = 8969) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8994;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9002;


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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9003;


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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9047) END FROM WidgetInst WHERE WidgetInstId = 9047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9052;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9048) END FROM WidgetInst WHERE WidgetInstId = 9048) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9049) END FROM WidgetInst WHERE WidgetInstId = 9049) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9047) END FROM WidgetInst WHERE WidgetInstId = 9047) = 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 = 'user' AND WidgetInstId = 9048) END FROM WidgetInst WHERE WidgetInstId = 9048) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9049) END FROM WidgetInst WHERE WidgetInstId = 9049) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9047) END FROM WidgetInst WHERE WidgetInstId = 9047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9048) END FROM WidgetInst WHERE WidgetInstId = 9048) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9049) END FROM WidgetInst WHERE WidgetInstId = 9049) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9074;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 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 = 'Gate' AND WidgetInstId = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9083;


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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 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 = 'user' AND WidgetInstId = 9147) END FROM WidgetInst WHERE WidgetInstId = 9147) = 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 = 'user' AND WidgetInstId = 9148) END FROM WidgetInst WHERE WidgetInstId = 9148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9149) END FROM WidgetInst WHERE WidgetInstId = 9149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9147) END FROM WidgetInst WHERE WidgetInstId = 9147) = 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 = 'user' AND WidgetInstId = 9148) END FROM WidgetInst WHERE WidgetInstId = 9148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9149) END FROM WidgetInst WHERE WidgetInstId = 9149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9147) END FROM WidgetInst WHERE WidgetInstId = 9147) = 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 = 'user' AND WidgetInstId = 9148) END FROM WidgetInst WHERE WidgetInstId = 9148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9149) END FROM WidgetInst WHERE WidgetInstId = 9149) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9174;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9182;


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 = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9183;


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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9184;


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 = 9247) END FROM WidgetInst WHERE WidgetInstId = 9247) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9248) END FROM WidgetInst WHERE WidgetInstId = 9248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9253;


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 = 9249) END FROM WidgetInst WHERE WidgetInstId = 9249) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9247) END FROM WidgetInst WHERE WidgetInstId = 9247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9262;


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 = 9248) END FROM WidgetInst WHERE WidgetInstId = 9248) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9249) END FROM WidgetInst WHERE WidgetInstId = 9249) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9247) END FROM WidgetInst WHERE WidgetInstId = 9247) = 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 IntValues WHERE Value = 1 AND WidgetInstId = 9248) END FROM WidgetInst WHERE WidgetInstId = 9248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9273;


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 = 9249) END FROM WidgetInst WHERE WidgetInstId = 9249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9274;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9277) END FROM WidgetInst WHERE WidgetInstId = 9277) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9247) END FROM WidgetInst WHERE WidgetInstId = 9247)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9282;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9278) END FROM WidgetInst WHERE WidgetInstId = 9278) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9248) END FROM WidgetInst WHERE WidgetInstId = 9248)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9283;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9279) END FROM WidgetInst WHERE WidgetInstId = 9279) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9249) END FROM WidgetInst WHERE WidgetInstId = 9249)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9284;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9277) END FROM WidgetInst WHERE WidgetInstId = 9277) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9247) END FROM WidgetInst WHERE WidgetInstId = 9247)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9292;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9278) END FROM WidgetInst WHERE WidgetInstId = 9278) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9248) END FROM WidgetInst WHERE WidgetInstId = 9248)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9293;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9279) END FROM WidgetInst WHERE WidgetInstId = 9279) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9249) END FROM WidgetInst WHERE WidgetInstId = 9249)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9294;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9277) END FROM WidgetInst WHERE WidgetInstId = 9277) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9247) END FROM WidgetInst WHERE WidgetInstId = 9247)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9302;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9278) END FROM WidgetInst WHERE WidgetInstId = 9278) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9248) END FROM WidgetInst WHERE WidgetInstId = 9248)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9303;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 9279) END FROM WidgetInst WHERE WidgetInstId = 9279) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9249) END FROM WidgetInst WHERE WidgetInstId = 9249)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9304;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 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 = 'Internal sink' AND WidgetInstId = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9313;


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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9314;


Query:
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 = 9322) END FROM WidgetInst WHERE WidgetInstId = 9322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9327;


Query:
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 = 9323) END FROM WidgetInst WHERE WidgetInstId = 9323) = 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 = 'Constant' AND WidgetInstId = 9324) END FROM WidgetInst WHERE WidgetInstId = 9324) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9322) END FROM WidgetInst WHERE WidgetInstId = 9322) = 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 = 'Time Series' AND WidgetInstId = 9323) END FROM WidgetInst WHERE WidgetInstId = 9323) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9324) END FROM WidgetInst WHERE WidgetInstId = 9324) = 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 = 'Weir' AND WidgetInstId = 9322) END FROM WidgetInst WHERE WidgetInstId = 9322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9357;


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 = 9323) END FROM WidgetInst WHERE WidgetInstId = 9323) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9358;


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 = 9324) END FROM WidgetInst WHERE WidgetInstId = 9324) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9322) END FROM WidgetInst WHERE WidgetInstId = 9322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9323) END FROM WidgetInst WHERE WidgetInstId = 9323) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9324) END FROM WidgetInst WHERE WidgetInstId = 9324) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9414;


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 = 8447) END FROM WidgetInst WHERE WidgetInstId = 8447) = 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 = 'Link' AND WidgetInstId = 8448) END FROM WidgetInst WHERE WidgetInstId = 8448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9428;


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 = 8449) END FROM WidgetInst WHERE WidgetInstId = 8449) = 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 = 'Constant' AND WidgetInstId = 9442) END FROM WidgetInst WHERE WidgetInstId = 9442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9447;


Query:
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 = 9443) END FROM WidgetInst WHERE WidgetInstId = 9443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9448;


Query:
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 = 9444) END FROM WidgetInst WHERE WidgetInstId = 9444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9442) END FROM WidgetInst WHERE WidgetInstId = 9442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9462;


