# QueryInst

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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 = 6047) END FROM WidgetInst WHERE WidgetInstId = 6047) = 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 = 'Rating curve' AND WidgetInstId = 6044) END FROM WidgetInst WHERE WidgetInstId = 6044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6116;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5345) END FROM WidgetInst WHERE WidgetInstId = 5345) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4955) END FROM WidgetInst WHERE WidgetInstId = 4955)) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5346) END FROM WidgetInst WHERE WidgetInstId = 5346) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4955) END FROM WidgetInst WHERE WidgetInstId = 4955)) = 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 IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 5347) END FROM WidgetInst WHERE WidgetInstId = 5347) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4955) END FROM WidgetInst WHERE WidgetInstId = 4955)) = 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 = 'File' AND WidgetInstId = 6288) END FROM WidgetInst WHERE WidgetInstId = 6288) = 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 = 'File' AND WidgetInstId = 6289) END FROM WidgetInst WHERE WidgetInstId = 6289) = 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 = 'File' AND WidgetInstId = 6290) END FROM WidgetInst WHERE WidgetInstId = 6290) = 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 = 'File' AND WidgetInstId = 6291) END FROM WidgetInst WHERE WidgetInstId = 6291) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6295;


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


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


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


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


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


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 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 = 'Wall (No-slip boundary)' AND WidgetInstId = 6302) END FROM WidgetInst WHERE WidgetInstId = 6302) = 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 = 'On' AND WidgetInstId = 6305) END FROM WidgetInst WHERE WidgetInstId = 6305) = 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 = 'Culvert HY-8' AND WidgetInstId = 6302) END FROM WidgetInst WHERE WidgetInstId = 6302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6308;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 6579) END FROM WidgetInst WHERE WidgetInstId = 6579) = 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 = 'Initial Water Surface Elevation' AND WidgetInstId = 6579) END FROM WidgetInst WHERE WidgetInstId = 6579) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6582;


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 6624) END FROM WidgetInst WHERE WidgetInstId = 6624) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6627;


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 6641) END FROM WidgetInst WHERE WidgetInstId = 6641) = 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 TextValues WHERE Value = 'Restart File' AND WidgetInstId = 6666) END FROM WidgetInst WHERE WidgetInstId = 6666) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 6666) END FROM WidgetInst WHERE WidgetInstId = 6666) = 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 = 'Parabolic' AND WidgetInstId = 6674) END FROM WidgetInst WHERE WidgetInstId = 6674) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6675;


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 6683) END FROM WidgetInst WHERE WidgetInstId = 6683) = 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 = 'Restart File' AND WidgetInstId = 6705) END FROM WidgetInst WHERE WidgetInstId = 6705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 6705) END FROM WidgetInst WHERE WidgetInstId = 6705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6708;


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


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


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


# QueryDef

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    2 - Stress/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format','NWS =    5 - Velocity/Pressure - every node/time interval','NWS =   12 - Velocity/Pressure OWI files','NWS =   15 - HWind files','NWS =   16 - GFDL files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    3 - Velocity in US Navy Fleet Numeric format','NWS =    6 - Velocity/Pressure on grid') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


