public static void AutoSkipValidation(DataPool pool) { bool skip = true; foreach (Document doc in pool.RootNode.Documents) { foreach (Field f in doc.Fields) { if (f.State == DataState.Error) { skip = false; break; } } if (skip == false) { break; } } Bool skipValidationField = pool.RootNode.Fields["cc_SkipValidation"] as Bool; skipValidationField.SetValue(skip); skipValidationField.State = DataState.Ok; }