# WidgetDef

ModelName: SRH-2D
WidgetName:
Sediment Size Class Cutoff (note: the size class is the table number minus 1 for the threshold particle size)_32


# QueryInst

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5271) END FROM WidgetInst WHERE WidgetInstId = 5271) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5247) END FROM WidgetInst WHERE WidgetInstId = 5247)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5291;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5272) END FROM WidgetInst WHERE WidgetInstId = 5272) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5248) END FROM WidgetInst WHERE WidgetInstId = 5248)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5292;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5273) END FROM WidgetInst WHERE WidgetInstId = 5273) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5249) END FROM WidgetInst WHERE WidgetInstId = 5249)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 4606) END FROM WidgetInst WHERE WidgetInstId = 4606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 4607) END FROM WidgetInst WHERE WidgetInstId = 4607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 4608) END FROM WidgetInst WHERE WidgetInstId = 4608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5300;


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 = 4609) END FROM WidgetInst WHERE WidgetInstId = 4609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5301;


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 = 5306) END FROM WidgetInst WHERE WidgetInstId = 5306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5307) END FROM WidgetInst WHERE WidgetInstId = 5307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5311;


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 = 5308) END FROM WidgetInst WHERE WidgetInstId = 5308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5312;


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 = 5309) END FROM WidgetInst WHERE WidgetInstId = 5309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5306) END FROM WidgetInst WHERE WidgetInstId = 5306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5307) END FROM WidgetInst WHERE WidgetInstId = 5307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5308) END FROM WidgetInst WHERE WidgetInstId = 5308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5324;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5309) END FROM WidgetInst WHERE WidgetInstId = 5309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5325;


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 = 5306) END FROM WidgetInst WHERE WidgetInstId = 5306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5307) END FROM WidgetInst WHERE WidgetInstId = 5307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5308) END FROM WidgetInst WHERE WidgetInstId = 5308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 5309) END FROM WidgetInst WHERE WidgetInstId = 5309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5337;


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 = 5306) END FROM WidgetInst WHERE WidgetInstId = 5306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5378;


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 = 5307) END FROM WidgetInst WHERE WidgetInstId = 5307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5379;


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 = 5308) END FROM WidgetInst WHERE WidgetInstId = 5308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5380;


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 = 5309) END FROM WidgetInst WHERE WidgetInstId = 5309) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5381;


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 = 4606) END FROM WidgetInst WHERE WidgetInstId = 4606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5390;


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 = 4607) END FROM WidgetInst WHERE WidgetInstId = 4607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5391;


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 = 4608) END FROM WidgetInst WHERE WidgetInstId = 4608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5392;


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 = 4609) END FROM WidgetInst WHERE WidgetInstId = 4609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5393;


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 = 5402) END FROM WidgetInst WHERE WidgetInstId = 5402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5406;


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 = 5403) END FROM WidgetInst WHERE WidgetInstId = 5403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5407;


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 = 5404) END FROM WidgetInst WHERE WidgetInstId = 5404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5408;


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 = 5405) END FROM WidgetInst WHERE WidgetInstId = 5405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5402) END FROM WidgetInst WHERE WidgetInstId = 5402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5403) END FROM WidgetInst WHERE WidgetInstId = 5403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5404) END FROM WidgetInst WHERE WidgetInstId = 5404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5405) END FROM WidgetInst WHERE WidgetInstId = 5405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5421;


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 = 5402) END FROM WidgetInst WHERE WidgetInstId = 5402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5430;


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 = 5403) END FROM WidgetInst WHERE WidgetInstId = 5403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5431;


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 = 5404) END FROM WidgetInst WHERE WidgetInstId = 5404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5432;


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 = 5405) END FROM WidgetInst WHERE WidgetInstId = 5405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5433;


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 = 5402) END FROM WidgetInst WHERE WidgetInstId = 5402) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5403) END FROM WidgetInst WHERE WidgetInstId = 5403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 5404) END FROM WidgetInst WHERE WidgetInstId = 5404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5476;


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 = 5405) END FROM WidgetInst WHERE WidgetInstId = 5405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5477;


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 = 5490) END FROM WidgetInst WHERE WidgetInstId = 5490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5494;


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 = 5491) END FROM WidgetInst WHERE WidgetInstId = 5491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5495;


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 = 5492) END FROM WidgetInst WHERE WidgetInstId = 5492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5496;


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 = 5493) END FROM WidgetInst WHERE WidgetInstId = 5493) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5497;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5490) END FROM WidgetInst WHERE WidgetInstId = 5490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5502;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5491) END FROM WidgetInst WHERE WidgetInstId = 5491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5492) END FROM WidgetInst WHERE WidgetInstId = 5492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5493) END FROM WidgetInst WHERE WidgetInstId = 5493) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5505;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5490) END FROM WidgetInst WHERE WidgetInstId = 5490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5491) END FROM WidgetInst WHERE WidgetInstId = 5491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5492) END FROM WidgetInst WHERE WidgetInstId = 5492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5493) END FROM WidgetInst WHERE WidgetInstId = 5493) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5490) END FROM WidgetInst WHERE WidgetInstId = 5490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5491) END FROM WidgetInst WHERE WidgetInstId = 5491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5492) END FROM WidgetInst WHERE WidgetInstId = 5492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5493) END FROM WidgetInst WHERE WidgetInstId = 5493) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5490) END FROM WidgetInst WHERE WidgetInstId = 5490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5491) END FROM WidgetInst WHERE WidgetInstId = 5491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5492) END FROM WidgetInst WHERE WidgetInstId = 5492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5493) END FROM WidgetInst WHERE WidgetInstId = 5493) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5490) END FROM WidgetInst WHERE WidgetInstId = 5490) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5491) END FROM WidgetInst WHERE WidgetInstId = 5491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5492) END FROM WidgetInst WHERE WidgetInstId = 5492) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5493) END FROM WidgetInst WHERE WidgetInstId = 5493) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5537;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4606) END FROM WidgetInst WHERE WidgetInstId = 4606) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4217) END FROM WidgetInst WHERE WidgetInstId = 4217)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5542;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4607) END FROM WidgetInst WHERE WidgetInstId = 4607) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4217) END FROM WidgetInst WHERE WidgetInstId = 4217)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5543;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4608) END FROM WidgetInst WHERE WidgetInstId = 4608) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4217) END FROM WidgetInst WHERE WidgetInstId = 4217)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5544;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 4609) END FROM WidgetInst WHERE WidgetInstId = 4609) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4217) END FROM WidgetInst WHERE WidgetInstId = 4217)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5545;


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 = 5550) END FROM WidgetInst WHERE WidgetInstId = 5550) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 5551) END FROM WidgetInst WHERE WidgetInstId = 5551) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 5552) END FROM WidgetInst WHERE WidgetInstId = 5552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5556;


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 = 5553) END FROM WidgetInst WHERE WidgetInstId = 5553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5557;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5564;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5564;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5564;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5564;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5564;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5564;


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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5565;


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 = 5567) END FROM WidgetInst WHERE WidgetInstId = 5567) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5568;


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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5570;


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 = 4214) END FROM WidgetInst WHERE WidgetInstId = 4214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5576;


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 = 4214) END FROM WidgetInst WHERE WidgetInstId = 4214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5582;


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 = 5584) END FROM WidgetInst WHERE WidgetInstId = 5584) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5584) END FROM WidgetInst WHERE WidgetInstId = 5584) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5588;


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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5593) END FROM WidgetInst WHERE WidgetInstId = 5593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5593) END FROM WidgetInst WHERE WidgetInstId = 5593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 5593) END FROM WidgetInst WHERE WidgetInstId = 5593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5600;


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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5603;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 5605) END FROM WidgetInst WHERE WidgetInstId = 5605)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5607) END FROM WidgetInst WHERE WidgetInstId = 5607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5607) END FROM WidgetInst WHERE WidgetInstId = 5607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5607) END FROM WidgetInst WHERE WidgetInstId = 5607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5607) END FROM WidgetInst WHERE WidgetInstId = 5607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5616;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5605) END FROM WidgetInst WHERE WidgetInstId = 5605)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5607) END FROM WidgetInst WHERE WidgetInstId = 5607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5607) END FROM WidgetInst WHERE WidgetInstId = 5607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5623) END FROM WidgetInst WHERE WidgetInstId = 5623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5607) END FROM WidgetInst WHERE WidgetInstId = 5607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5607) END FROM WidgetInst WHERE WidgetInstId = 5607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5627;


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 = 5623) END FROM WidgetInst WHERE WidgetInstId = 5623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 5607) END FROM WidgetInst WHERE WidgetInstId = 5607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 5607) END FROM WidgetInst WHERE WidgetInstId = 5607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5631;


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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5668) END FROM WidgetInst WHERE WidgetInstId = 5668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5668) END FROM WidgetInst WHERE WidgetInstId = 5668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5668) END FROM WidgetInst WHERE WidgetInstId = 5668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5673;


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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5684) END FROM WidgetInst WHERE WidgetInstId = 5684) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5684) END FROM WidgetInst WHERE WidgetInstId = 5684) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5687;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5684) END FROM WidgetInst WHERE WidgetInstId = 5684) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5704) END FROM WidgetInst WHERE WidgetInstId = 5704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5704) END FROM WidgetInst WHERE WidgetInstId = 5704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 5704) END FROM WidgetInst WHERE WidgetInstId = 5704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5709;


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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5711;


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 = 5724) END FROM WidgetInst WHERE WidgetInstId = 5724) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5725;


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 = 5724) END FROM WidgetInst WHERE WidgetInstId = 5724) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5727;


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 = 5724) END FROM WidgetInst WHERE WidgetInstId = 5724) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5729;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5730) END FROM WidgetInst WHERE WidgetInstId = 5730) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5724) END FROM WidgetInst WHERE WidgetInstId = 5724)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5731;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5730) END FROM WidgetInst WHERE WidgetInstId = 5730) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5724) END FROM WidgetInst WHERE WidgetInstId = 5724)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5733;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5730) END FROM WidgetInst WHERE WidgetInstId = 5730) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 5724) END FROM WidgetInst WHERE WidgetInstId = 5724)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5735;


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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5737;


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 = 5739) END FROM WidgetInst WHERE WidgetInstId = 5739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5739) END FROM WidgetInst WHERE WidgetInstId = 5739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5743;


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 = 5739) END FROM WidgetInst WHERE WidgetInstId = 5739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5746;


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 = 5739) END FROM WidgetInst WHERE WidgetInstId = 5739) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5757;


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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5760;


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 = 5763) END FROM WidgetInst WHERE WidgetInstId = 5763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5763) END FROM WidgetInst WHERE WidgetInstId = 5763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5767;


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 = 5763) END FROM WidgetInst WHERE WidgetInstId = 5763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5770;


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 = 5763) END FROM WidgetInst WHERE WidgetInstId = 5763) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5781;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 5785) END FROM WidgetInst WHERE WidgetInstId = 5785) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5785) END FROM WidgetInst WHERE WidgetInstId = 5785) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5785) END FROM WidgetInst WHERE WidgetInstId = 5785) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5785) END FROM WidgetInst WHERE WidgetInstId = 5785) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5785) END FROM WidgetInst WHERE WidgetInstId = 5785) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 5785) END FROM WidgetInst WHERE WidgetInstId = 5785) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5796;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5564) END FROM WidgetInst WHERE WidgetInstId = 5564) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 4217) END FROM WidgetInst WHERE WidgetInstId = 4217)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5798;


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 = 5800) END FROM WidgetInst WHERE WidgetInstId = 5800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 5831) END FROM WidgetInst WHERE WidgetInstId = 5831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5832;


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 = 5831) END FROM WidgetInst WHERE WidgetInstId = 5831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5834;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5840;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5848;


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 = 5844) END FROM WidgetInst WHERE WidgetInstId = 5844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5850;


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 = 5846) END FROM WidgetInst WHERE WidgetInstId = 5846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5852;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5854;


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 = 5844) END FROM WidgetInst WHERE WidgetInstId = 5844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5856;


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 = 5846) END FROM WidgetInst WHERE WidgetInstId = 5846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5858;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5860;


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 = 5844) END FROM WidgetInst WHERE WidgetInstId = 5844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5862;


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 = 5846) END FROM WidgetInst WHERE WidgetInstId = 5846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5864;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5866;


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 = 5844) END FROM WidgetInst WHERE WidgetInstId = 5844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 5846) END FROM WidgetInst WHERE WidgetInstId = 5846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5870;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5872;


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 = 5844) END FROM WidgetInst WHERE WidgetInstId = 5844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5874;


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 = 5846) END FROM WidgetInst WHERE WidgetInstId = 5846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5876;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5878;


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 = 5844) END FROM WidgetInst WHERE WidgetInstId = 5844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5880;


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 = 5846) END FROM WidgetInst WHERE WidgetInstId = 5846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5882;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5884;


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 = 5844) END FROM WidgetInst WHERE WidgetInstId = 5844) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5886;


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 = 5846) END FROM WidgetInst WHERE WidgetInstId = 5846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5888;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5890;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5892;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5894;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5896;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5898;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5900;


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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5902;


Query:
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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5906;


Query:
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 = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5908;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 5839) END FROM WidgetInst WHERE WidgetInstId = 5839) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 5923) END FROM WidgetInst WHERE WidgetInstId = 5923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5924;


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 = 5933) END FROM WidgetInst WHERE WidgetInstId = 5933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 5936) END FROM WidgetInst WHERE WidgetInstId = 5936) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 5941) END FROM WidgetInst WHERE WidgetInstId = 5941) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5942;


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 = 5941) END FROM WidgetInst WHERE WidgetInstId = 5941) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5944;


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 = 5933) END FROM WidgetInst WHERE WidgetInstId = 5933) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5959;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5973;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5973;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5973;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5973;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5973;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 5973;


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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5974;


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 = 5976) END FROM WidgetInst WHERE WidgetInstId = 5976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5977;


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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2600) END FROM WidgetInst WHERE WidgetInstId = 2600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2600) END FROM WidgetInst WHERE WidgetInstId = 2600) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5988;


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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5991;


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 = 5993) END FROM WidgetInst WHERE WidgetInstId = 5993) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 5993) END FROM WidgetInst WHERE WidgetInstId = 5993) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 5997;


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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6000;


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 = 6002) END FROM WidgetInst WHERE WidgetInstId = 6002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6002) END FROM WidgetInst WHERE WidgetInstId = 6002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6006;


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 = 6002) END FROM WidgetInst WHERE WidgetInstId = 6002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6012;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6014) END FROM WidgetInst WHERE WidgetInstId = 6014)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6016) END FROM WidgetInst WHERE WidgetInstId = 6016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6016) END FROM WidgetInst WHERE WidgetInstId = 6016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6016) END FROM WidgetInst WHERE WidgetInstId = 6016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6016) END FROM WidgetInst WHERE WidgetInstId = 6016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6025;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6014) END FROM WidgetInst WHERE WidgetInstId = 6014)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6016) END FROM WidgetInst WHERE WidgetInstId = 6016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6016) END FROM WidgetInst WHERE WidgetInstId = 6016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6032) END FROM WidgetInst WHERE WidgetInstId = 6032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6016) END FROM WidgetInst WHERE WidgetInstId = 6016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6016) END FROM WidgetInst WHERE WidgetInstId = 6016) = 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 = 'Rating Curve' AND WidgetInstId = 6032) END FROM WidgetInst WHERE WidgetInstId = 6032) = 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 = 'U.S. Customary' AND WidgetInstId = 6016) END FROM WidgetInst WHERE WidgetInstId = 6016) = 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 = 'Metric' AND WidgetInstId = 6016) END FROM WidgetInst WHERE WidgetInstId = 6016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6040;


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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6041;


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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6044;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6077) END FROM WidgetInst WHERE WidgetInstId = 6077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6077) END FROM WidgetInst WHERE WidgetInstId = 6077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6077) END FROM WidgetInst WHERE WidgetInstId = 6077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6082;


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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6093) END FROM WidgetInst WHERE WidgetInstId = 6093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6094;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6093) END FROM WidgetInst WHERE WidgetInstId = 6093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6093) END FROM WidgetInst WHERE WidgetInstId = 6093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6098;


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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6113) END FROM WidgetInst WHERE WidgetInstId = 6113) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6113) END FROM WidgetInst WHERE WidgetInstId = 6113) = 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 = 'user' AND WidgetInstId = 6113) END FROM WidgetInst WHERE WidgetInstId = 6113) = 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 = 'Pressure' AND WidgetInstId = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6120;


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 = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6136;


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 = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6138;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6139) END FROM WidgetInst WHERE WidgetInstId = 6139) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6140;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6139) END FROM WidgetInst WHERE WidgetInstId = 6139) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6142;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6139) END FROM WidgetInst WHERE WidgetInstId = 6139) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6133) END FROM WidgetInst WHERE WidgetInstId = 6133)) = 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 = 'Internal sink' AND WidgetInstId = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 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 = 6148) END FROM WidgetInst WHERE WidgetInstId = 6148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6148) END FROM WidgetInst WHERE WidgetInstId = 6148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6148) END FROM WidgetInst WHERE WidgetInstId = 6148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6155;


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 = 6148) END FROM WidgetInst WHERE WidgetInstId = 6148) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6166;


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 = 5973) END FROM WidgetInst WHERE WidgetInstId = 5973) = 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 = 'Constant' AND WidgetInstId = 6172) END FROM WidgetInst WHERE WidgetInstId = 6172) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6172) END FROM WidgetInst WHERE WidgetInstId = 6172) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6176;


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 = 6172) END FROM WidgetInst WHERE WidgetInstId = 6172) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6179;


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 = 6172) END FROM WidgetInst WHERE WidgetInstId = 6172) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6190;


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 = 6194) END FROM WidgetInst WHERE WidgetInstId = 6194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6194) END FROM WidgetInst WHERE WidgetInstId = 6194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6194) END FROM WidgetInst WHERE WidgetInstId = 6194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6194) END FROM WidgetInst WHERE WidgetInstId = 6194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6194) END FROM WidgetInst WHERE WidgetInstId = 6194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 6194) END FROM WidgetInst WHERE WidgetInstId = 6194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2745) END FROM WidgetInst WHERE WidgetInstId = 2745) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 2603) END FROM WidgetInst WHERE WidgetInstId = 2603)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6207;


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 = 6209) END FROM WidgetInst WHERE WidgetInstId = 6209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6210;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6220;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6220;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6220;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6220;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6220;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6220;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6221;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6221;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6221;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6221;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6221;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6221;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6222;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6222;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6222;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6222;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6222;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6222;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6223;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6223;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6223;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6223;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6223;


Query:
UPDATE ComboOptionInst SET Enabled = CASE 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 = 6223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6224;


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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6225;


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 = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6226;


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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6227;


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 = 6232) END FROM WidgetInst WHERE WidgetInstId = 6232) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6236;


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 = 6233) END FROM WidgetInst WHERE WidgetInstId = 6233) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6237;


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 = 6234) END FROM WidgetInst WHERE WidgetInstId = 6234) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6238;


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 = 6235) END FROM WidgetInst WHERE WidgetInstId = 6235) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6244;


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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6245;


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 = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6246;


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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 5828) END FROM WidgetInst WHERE WidgetInstId = 5828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 5828) END FROM WidgetInst WHERE WidgetInstId = 5828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 5828) END FROM WidgetInst WHERE WidgetInstId = 5828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 5828) END FROM WidgetInst WHERE WidgetInstId = 5828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 5828) END FROM WidgetInst WHERE WidgetInstId = 5828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 5828) END FROM WidgetInst WHERE WidgetInstId = 5828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 5828) END FROM WidgetInst WHERE WidgetInstId = 5828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 5828) END FROM WidgetInst WHERE WidgetInstId = 5828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 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 IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6300) END FROM WidgetInst WHERE WidgetInstId = 6300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6301) END FROM WidgetInst WHERE WidgetInstId = 6301) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6302) END FROM WidgetInst WHERE WidgetInstId = 6302) = 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 = 'Constant' AND WidgetInstId = 6303) END FROM WidgetInst WHERE WidgetInstId = 6303) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6307;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6300) END FROM WidgetInst WHERE WidgetInstId = 6300) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6301) END FROM WidgetInst WHERE WidgetInstId = 6301) = 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 = 'Time Series' AND WidgetInstId = 6302) END FROM WidgetInst WHERE WidgetInstId = 6302) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6303) END FROM WidgetInst WHERE WidgetInstId = 6303) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6328;


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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 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 = 'Exit-H (subcritical outflow)' AND WidgetInstId = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6330;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6336) END FROM WidgetInst WHERE WidgetInstId = 6336) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6337) END FROM WidgetInst WHERE WidgetInstId = 6337) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6338) END FROM WidgetInst WHERE WidgetInstId = 6338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6339) END FROM WidgetInst WHERE WidgetInstId = 6339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6336) END FROM WidgetInst WHERE WidgetInstId = 6336) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6337) END FROM WidgetInst WHERE WidgetInstId = 6337) = 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 = 'Time Series' AND WidgetInstId = 6338) END FROM WidgetInst WHERE WidgetInstId = 6338) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6354;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6339) END FROM WidgetInst WHERE WidgetInstId = 6339) = 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 = 'Rating Curve' AND WidgetInstId = 6336) END FROM WidgetInst WHERE WidgetInstId = 6336) = 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 = 'Rating Curve' AND WidgetInstId = 6337) END FROM WidgetInst WHERE WidgetInstId = 6337) = 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 = 6338) END FROM WidgetInst WHERE WidgetInstId = 6338) = 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 = 'Rating Curve' AND WidgetInstId = 6339) END FROM WidgetInst WHERE WidgetInstId = 6339) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6367;


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 = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6376;


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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6377;


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 = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6378;


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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6379;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6384) END FROM WidgetInst WHERE WidgetInstId = 6384)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6396;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6385) END FROM WidgetInst WHERE WidgetInstId = 6385)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6397;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6386) END FROM WidgetInst WHERE WidgetInstId = 6386)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6398;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6387) END FROM WidgetInst WHERE WidgetInstId = 6387)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6392) END FROM WidgetInst WHERE WidgetInstId = 6392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6393) END FROM WidgetInst WHERE WidgetInstId = 6393) = 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 = 'U.S. Customary' AND WidgetInstId = 6394) END FROM WidgetInst WHERE WidgetInstId = 6394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6395) END FROM WidgetInst WHERE WidgetInstId = 6395) = 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 = 'Metric' AND WidgetInstId = 6392) END FROM WidgetInst WHERE WidgetInstId = 6392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6393) END FROM WidgetInst WHERE WidgetInstId = 6393) = 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 = 'Metric' AND WidgetInstId = 6394) END FROM WidgetInst WHERE WidgetInstId = 6394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6395) END FROM WidgetInst WHERE WidgetInstId = 6395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6392) END FROM WidgetInst WHERE WidgetInstId = 6392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6393) END FROM WidgetInst WHERE WidgetInstId = 6393) = 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 = 'U.S. Customary' AND WidgetInstId = 6394) END FROM WidgetInst WHERE WidgetInstId = 6394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6395) END FROM WidgetInst WHERE WidgetInstId = 6395) = 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 = 'Metric' AND WidgetInstId = 6392) END FROM WidgetInst WHERE WidgetInstId = 6392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6393) END FROM WidgetInst WHERE WidgetInstId = 6393) = 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 = 'Metric' AND WidgetInstId = 6394) END FROM WidgetInst WHERE WidgetInstId = 6394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6395) END FROM WidgetInst WHERE WidgetInstId = 6395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6431;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6384) END FROM WidgetInst WHERE WidgetInstId = 6384)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6432;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6385) END FROM WidgetInst WHERE WidgetInstId = 6385)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6433;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6386) END FROM WidgetInst WHERE WidgetInstId = 6386)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6434;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6387) END FROM WidgetInst WHERE WidgetInstId = 6387)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6392) END FROM WidgetInst WHERE WidgetInstId = 6392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6393) END FROM WidgetInst WHERE WidgetInstId = 6393) = 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 = 'U.S. Customary' AND WidgetInstId = 6394) END FROM WidgetInst WHERE WidgetInstId = 6394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6395) END FROM WidgetInst WHERE WidgetInstId = 6395) = 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 = 'Metric' AND WidgetInstId = 6392) END FROM WidgetInst WHERE WidgetInstId = 6392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6393) END FROM WidgetInst WHERE WidgetInstId = 6393) = 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 TextValues WHERE Value = 'Metric' AND WidgetInstId = 6394) END FROM WidgetInst WHERE WidgetInstId = 6394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6395) END FROM WidgetInst WHERE WidgetInstId = 6395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6456) END FROM WidgetInst WHERE WidgetInstId = 6456) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6457) END FROM WidgetInst WHERE WidgetInstId = 6457) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6458) END FROM WidgetInst WHERE WidgetInstId = 6458) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6459) END FROM WidgetInst WHERE WidgetInstId = 6459) = 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 TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6392) END FROM WidgetInst WHERE WidgetInstId = 6392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6393) END FROM WidgetInst WHERE WidgetInstId = 6393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6394) END FROM WidgetInst WHERE WidgetInstId = 6394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6395) END FROM WidgetInst WHERE WidgetInstId = 6395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6392) END FROM WidgetInst WHERE WidgetInstId = 6392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6393) END FROM WidgetInst WHERE WidgetInstId = 6393) = 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 = 'Metric' AND WidgetInstId = 6394) END FROM WidgetInst WHERE WidgetInstId = 6394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6395) END FROM WidgetInst WHERE WidgetInstId = 6395) = 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 = 'Rating Curve' AND WidgetInstId = 6456) END FROM WidgetInst WHERE WidgetInstId = 6456) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 6457) END FROM WidgetInst WHERE WidgetInstId = 6457) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 6458) END FROM WidgetInst WHERE WidgetInstId = 6458) = 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 = 'Rating Curve' AND WidgetInstId = 6459) END FROM WidgetInst WHERE WidgetInstId = 6459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6479;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6392) END FROM WidgetInst WHERE WidgetInstId = 6392) = 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 = 'U.S. Customary' AND WidgetInstId = 6393) END FROM WidgetInst WHERE WidgetInstId = 6393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6394) END FROM WidgetInst WHERE WidgetInstId = 6394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 6395) END FROM WidgetInst WHERE WidgetInstId = 6395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6392) END FROM WidgetInst WHERE WidgetInstId = 6392) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6393) END FROM WidgetInst WHERE WidgetInstId = 6393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6394) END FROM WidgetInst WHERE WidgetInstId = 6394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 6395) END FROM WidgetInst WHERE WidgetInstId = 6395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6491;


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 = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6492;


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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6493;


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 = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6494;


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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 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 = 'Culvert' AND WidgetInstId = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6504;


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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 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 = 'Culvert' AND WidgetInstId = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6506;


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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6636) END FROM WidgetInst WHERE WidgetInstId = 6636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6637) END FROM WidgetInst WHERE WidgetInstId = 6637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6638) END FROM WidgetInst WHERE WidgetInstId = 6638) = 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 = 'user' AND WidgetInstId = 6639) END FROM WidgetInst WHERE WidgetInstId = 6639) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6636) END FROM WidgetInst WHERE WidgetInstId = 6636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6637) END FROM WidgetInst WHERE WidgetInstId = 6637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6638) END FROM WidgetInst WHERE WidgetInstId = 6638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6639) END FROM WidgetInst WHERE WidgetInstId = 6639) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6636) END FROM WidgetInst WHERE WidgetInstId = 6636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6637) END FROM WidgetInst WHERE WidgetInstId = 6637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6638) END FROM WidgetInst WHERE WidgetInstId = 6638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6639) END FROM WidgetInst WHERE WidgetInstId = 6639) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6659;


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 = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6664;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6665;


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 = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6666;


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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 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 = 'user' AND WidgetInstId = 6700) END FROM WidgetInst WHERE WidgetInstId = 6700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6701) END FROM WidgetInst WHERE WidgetInstId = 6701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6702) END FROM WidgetInst WHERE WidgetInstId = 6702) = 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 = 'user' AND WidgetInstId = 6703) END FROM WidgetInst WHERE WidgetInstId = 6703) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6700) END FROM WidgetInst WHERE WidgetInstId = 6700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6712;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6701) END FROM WidgetInst WHERE WidgetInstId = 6701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6702) END FROM WidgetInst WHERE WidgetInstId = 6702) = 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 = 'user' AND WidgetInstId = 6703) END FROM WidgetInst WHERE WidgetInstId = 6703) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6700) END FROM WidgetInst WHERE WidgetInstId = 6700) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6701) END FROM WidgetInst WHERE WidgetInstId = 6701) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6721;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6702) END FROM WidgetInst WHERE WidgetInstId = 6702) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6722;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6703) END FROM WidgetInst WHERE WidgetInstId = 6703) = 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 = 'Gate' AND WidgetInstId = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6780) END FROM WidgetInst WHERE WidgetInstId = 6780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6781) END FROM WidgetInst WHERE WidgetInstId = 6781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6782) END FROM WidgetInst WHERE WidgetInstId = 6782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6783) END FROM WidgetInst WHERE WidgetInstId = 6783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6780) END FROM WidgetInst WHERE WidgetInstId = 6780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6781) END FROM WidgetInst WHERE WidgetInstId = 6781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6782) END FROM WidgetInst WHERE WidgetInstId = 6782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6783) END FROM WidgetInst WHERE WidgetInstId = 6783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6780) END FROM WidgetInst WHERE WidgetInstId = 6780) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6781) END FROM WidgetInst WHERE WidgetInstId = 6781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6782) END FROM WidgetInst WHERE WidgetInstId = 6782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 6783) END FROM WidgetInst WHERE WidgetInstId = 6783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6803;


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 = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6808;


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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6809;


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 = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6810;


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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6811;


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 = 6860) END FROM WidgetInst WHERE WidgetInstId = 6860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6864;


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 = 6861) END FROM WidgetInst WHERE WidgetInstId = 6861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6865;


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 = 6862) END FROM WidgetInst WHERE WidgetInstId = 6862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6866;


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 = 6863) END FROM WidgetInst WHERE WidgetInstId = 6863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6867;


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 = 6860) END FROM WidgetInst WHERE WidgetInstId = 6860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6872;


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 = 6861) END FROM WidgetInst WHERE WidgetInstId = 6861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6862) END FROM WidgetInst WHERE WidgetInstId = 6862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6874;


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 = 6863) END FROM WidgetInst WHERE WidgetInstId = 6863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6875;


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 = 6860) END FROM WidgetInst WHERE WidgetInstId = 6860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6880;


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 = 6861) END FROM WidgetInst WHERE WidgetInstId = 6861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6881;


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 = 6862) END FROM WidgetInst WHERE WidgetInstId = 6862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6882;


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 = 6863) END FROM WidgetInst WHERE WidgetInstId = 6863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6883;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6884) END FROM WidgetInst WHERE WidgetInstId = 6884) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6860) END FROM WidgetInst WHERE WidgetInstId = 6860)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6888;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6885) END FROM WidgetInst WHERE WidgetInstId = 6885) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6861) END FROM WidgetInst WHERE WidgetInstId = 6861)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6889;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6886) END FROM WidgetInst WHERE WidgetInstId = 6886) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6862) END FROM WidgetInst WHERE WidgetInstId = 6862)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6890;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6887) END FROM WidgetInst WHERE WidgetInstId = 6887) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6863) END FROM WidgetInst WHERE WidgetInstId = 6863)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6891;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6884) END FROM WidgetInst WHERE WidgetInstId = 6884) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6860) END FROM WidgetInst WHERE WidgetInstId = 6860)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6896;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6885) END FROM WidgetInst WHERE WidgetInstId = 6885) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6861) END FROM WidgetInst WHERE WidgetInstId = 6861)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6897;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6886) END FROM WidgetInst WHERE WidgetInstId = 6886) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6862) END FROM WidgetInst WHERE WidgetInstId = 6862)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6898;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6887) END FROM WidgetInst WHERE WidgetInstId = 6887) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6863) END FROM WidgetInst WHERE WidgetInstId = 6863)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6899;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6884) END FROM WidgetInst WHERE WidgetInstId = 6884) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6860) END FROM WidgetInst WHERE WidgetInstId = 6860)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6904;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6885) END FROM WidgetInst WHERE WidgetInstId = 6885) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6861) END FROM WidgetInst WHERE WidgetInstId = 6861)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6905;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6886) END FROM WidgetInst WHERE WidgetInstId = 6886) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6862) END FROM WidgetInst WHERE WidgetInstId = 6862)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6906;


Query:
UPDATE WidgetInst SET Enabled = CASE 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 = 6887) END FROM WidgetInst WHERE WidgetInstId = 6887) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 6863) END FROM WidgetInst WHERE WidgetInstId = 6863)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6907;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6912;


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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6914;


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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6920) END FROM WidgetInst WHERE WidgetInstId = 6920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6924;


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 = 6921) END FROM WidgetInst WHERE WidgetInstId = 6921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 6922) END FROM WidgetInst WHERE WidgetInstId = 6922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6926;


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 = 6923) END FROM WidgetInst WHERE WidgetInstId = 6923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6927;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6920) END FROM WidgetInst WHERE WidgetInstId = 6920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6921) END FROM WidgetInst WHERE WidgetInstId = 6921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6922) END FROM WidgetInst WHERE WidgetInstId = 6922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 6923) END FROM WidgetInst WHERE WidgetInstId = 6923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6920) END FROM WidgetInst WHERE WidgetInstId = 6920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6948;


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 = 6921) END FROM WidgetInst WHERE WidgetInstId = 6921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 6922) END FROM WidgetInst WHERE WidgetInstId = 6922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6950;


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 = 6923) END FROM WidgetInst WHERE WidgetInstId = 6923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6951;


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 = 6920) END FROM WidgetInst WHERE WidgetInstId = 6920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6992;


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 = 6921) END FROM WidgetInst WHERE WidgetInstId = 6921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6993;


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 = 6922) END FROM WidgetInst WHERE WidgetInstId = 6922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6994;


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 = 6923) END FROM WidgetInst WHERE WidgetInstId = 6923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6995;


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 = 6220) END FROM WidgetInst WHERE WidgetInstId = 6220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7004;


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 = 6221) END FROM WidgetInst WHERE WidgetInstId = 6221) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7005;


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 = 6222) END FROM WidgetInst WHERE WidgetInstId = 6222) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7006;


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 = 6223) END FROM WidgetInst WHERE WidgetInstId = 6223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7007;


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 = 7016) END FROM WidgetInst WHERE WidgetInstId = 7016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7020;


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 = 7017) END FROM WidgetInst WHERE WidgetInstId = 7017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7021;


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 = 7018) END FROM WidgetInst WHERE WidgetInstId = 7018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7022;


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 = 7019) END FROM WidgetInst WHERE WidgetInstId = 7019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7016) END FROM WidgetInst WHERE WidgetInstId = 7016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7017) END FROM WidgetInst WHERE WidgetInstId = 7017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7018) END FROM WidgetInst WHERE WidgetInstId = 7018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7019) END FROM WidgetInst WHERE WidgetInstId = 7019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7035;


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 = 7016) END FROM WidgetInst WHERE WidgetInstId = 7016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7044;


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 = 7017) END FROM WidgetInst WHERE WidgetInstId = 7017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7018) END FROM WidgetInst WHERE WidgetInstId = 7018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7046;


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 = 7019) END FROM WidgetInst WHERE WidgetInstId = 7019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7047;


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 = 7016) END FROM WidgetInst WHERE WidgetInstId = 7016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7088;


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 = 7017) END FROM WidgetInst WHERE WidgetInstId = 7017) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7089;


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 = 7018) END FROM WidgetInst WHERE WidgetInstId = 7018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7090;


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 = 7019) END FROM WidgetInst WHERE WidgetInstId = 7019) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7091;


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 = 7104) END FROM WidgetInst WHERE WidgetInstId = 7104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7108;


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 = 7105) END FROM WidgetInst WHERE WidgetInstId = 7105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7109;


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 = 7106) END FROM WidgetInst WHERE WidgetInstId = 7106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7110;


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 = 7107) END FROM WidgetInst WHERE WidgetInstId = 7107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7104) END FROM WidgetInst WHERE WidgetInstId = 7104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7105) END FROM WidgetInst WHERE WidgetInstId = 7105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7106) END FROM WidgetInst WHERE WidgetInstId = 7106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7107) END FROM WidgetInst WHERE WidgetInstId = 7107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7104) END FROM WidgetInst WHERE WidgetInstId = 7104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7124;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7105) END FROM WidgetInst WHERE WidgetInstId = 7105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7125;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7106) END FROM WidgetInst WHERE WidgetInstId = 7106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7107) END FROM WidgetInst WHERE WidgetInstId = 7107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7127;


