diff --git a/src/Libraries/CoreNodes/DSCoreNodesImages.resx b/src/Libraries/CoreNodes/DSCoreNodesImages.resx
index 636f2bf5ff4..4cbbb8dc9c3 100644
--- a/src/Libraries/CoreNodes/DSCoreNodesImages.resx
+++ b/src/Libraries/CoreNodes/DSCoreNodesImages.resx
@@ -7586,4 +7586,80 @@
Resources\DSCore.Data.StringifyJSON.Small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAS7SURBVHhe7do9bhRBEAVgX8FX4AqcAMkJEiLzFXwFp4TE
+ ZL4AgQ9A4oh8L4CEEwIyHCAhESAN9VZbq9reNzPV262yZ6dG+oT1qmfprt7/2YthGNIzomGKQ8MUh4Yp
+ Dg1THBqmODRMcWiY4tAwxaFhikPDFIeGKQ4NUxwapjg0THFomOLQMMWhYdq7FfeiPJ4EaleCnedGwzR8
+ FN7jQbwS7HZm0XDFcI9+FLUHzjlpE2i4Umhgy4FHArvdSTRcMTyv2wPP/zfCjnkt0Gx2oGbHzqLhyqHp
+ eEqZe4HdiPIoN2sWDVfukmRM+WjBkRsQKDfgmbG3qteCjR1FwzQLL7blgdcNNnYSDb3efPo2rM2HLz9l
+ 6fSofgcENPRiEzxnnze/ZNmHx++///DPSc0HGnqxSZ6j93ffh82PP7LkwwMZanLQ/njQ0MtOsqydmaMv
+ 5PBo6LF2GnqtZAPwgaw8bnutnYZevSbxwpX3/u27nV5rp6FXr0m8cOX3PtiQ3IBA+HSLT71q+2Gr19pp
+ 6NVrEkvUa+009Oo1iSXqtXYaevWaxBL1WjsNvXpN4oWzlylxDWD7qbfX2mno1WsSLxi7TIlfRFz2WjsN
+ vU6ZxNd3by/FrRh28M6Cji3J2BvxYM7dCNyW6yKKjLvanb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cii5bg0CinAlcjqIQXH/53T75EfjbBSDwYxF4TFsIbo/tbWfP1tznkKLLqCD2yKjcpegyKog9Mip3
+ KbqMCmKPjMpdii6jgtgjo3KXosuoIPbIqNyl6DIqiD0yKncpurRBHJm+X7YgRRcVzBHp+2ULUnRRwRyR
+ vl+2IMUiDykWeUixyEOKRR5SLPKQYpGHFIs8pFjkIcUiDykWeUixyEOKRR5SLPKQYpGHFIs8pFjkIcUi
+ DykWeUixyEOKRR5SLPKQYpGHFIs8pFjkIcUiDykWeUixyOL04j/w1CJEODKlZAAAAABJRU5ErkJggg==
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAAA7AAAAOwASfED60AAAEaSURBVFhH7ZMxCsIwFIZ7hV7BK3gCoYvg6lm6Ojq79Qpd
+ BZdO7t2cHFwdxRvE/y8JNM3L0qRPBAsfJl+efT9NUhhjvoooNRGlJqLURJSaiFITUWaiBh1wTw/WwKvz
+ JpnZA4bguAQPi1fnTRaGX+A1cXKAzelucnK+vfHa4TkCr5c3cfBPU5dAA8zh8uRPsB4IkjkAP3sbe2cg
+ SOYAA7MDXHfbEnTAgB6srGutG66WdV4dvDv9fUoANmrtuAFswhA1YLMqVodxlgDjJhXnkbVoHfkHSAnA
+ veVd5ph7O+yznY+bRutISgAeOJ5qNnOn263RuVsQrSOzA+Ti9wIswbQPCYQ2otRElJqIUhNRaiJKTUSp
+ iSg1EaUepvgAv22e4jr/Ak4AAAAASUVORK5CYII=
+
+
\ No newline at end of file
diff --git a/src/Libraries/CoreNodes/List.cs b/src/Libraries/CoreNodes/List.cs
index b890c8fbf06..90c886c9aa8 100644
--- a/src/Libraries/CoreNodes/List.cs
+++ b/src/Libraries/CoreNodes/List.cs
@@ -819,6 +819,56 @@ public static bool AllFalse(IList list)
return result;
}
+ ///
+ /// Determines if any item in the given list is a boolean and has a true value.
+ ///
+ /// List to be checked on whether any item is true.
+ /// Whether any item is true.
+ /// test,any,true,istrue
+ [IsVisibleInDynamoLibrary(true)]
+ public static bool AnyTrue(IList list)
+ {
+ bool result = false;
+ foreach (object obj in list)
+ {
+ if (obj is IList subList)
+ {
+ result = AnyTrue(subList);
+ }
+ else if (obj is bool boolObj && boolObj)
+ {
+ result = true;
+ }
+ if (result) break;
+ }
+ return result;
+ }
+
+ ///
+ /// Determines if any item in the given list is a boolean and has a false value.
+ ///
+ /// List to be checked on whether any item is false.
+ /// Whether any item is false.
+ /// test,any,false,isfalse
+ [IsVisibleInDynamoLibrary(true)]
+ public static bool AnyFalse(IList list)
+ {
+ bool result = false;
+ foreach (object obj in list)
+ {
+ if (obj is IList subList)
+ {
+ result = AnyFalse(subList);
+ }
+ else if(obj is bool boolObj && !boolObj)
+ {
+ result = true;
+ }
+ if (result) break;
+ }
+ return result;
+ }
+
///
/// Returns the number of items stored in the given list.
///
diff --git a/src/LibraryViewExtension/web/library/layoutSpecs.json b/src/LibraryViewExtension/web/library/layoutSpecs.json
index 2e39b1ec373..db28d332e79 100644
--- a/src/LibraryViewExtension/web/library/layoutSpecs.json
+++ b/src/LibraryViewExtension/web/library/layoutSpecs.json
@@ -24,6 +24,12 @@
{
"path": "DSCoreNodes.DSCore.List.AllTrue"
},
+ {
+ "path": "DSCoreNodes.DSCore.List.AnyFalse"
+ },
+ {
+ "path": "DSCoreNodes.DSCore.List.AnyTrue"
+ },
{
"path": "DSCoreNodes.DSCore.List.SetIntersection"
},
diff --git a/src/LibraryViewExtensionMSWebBrowser/web/library/layoutSpecs.json b/src/LibraryViewExtensionMSWebBrowser/web/library/layoutSpecs.json
index 67fca8dbb98..ded9aa18164 100644
--- a/src/LibraryViewExtensionMSWebBrowser/web/library/layoutSpecs.json
+++ b/src/LibraryViewExtensionMSWebBrowser/web/library/layoutSpecs.json
@@ -24,6 +24,12 @@
{
"path": "DSCoreNodes.DSCore.List.AllTrue"
},
+ {
+ "path": "DSCoreNodes.DSCore.List.AnyFalse"
+ },
+ {
+ "path": "DSCoreNodes.DSCore.List.AnyTrue"
+ },
{
"path": "DSCoreNodes.DSCore.List.SetIntersection"
},
diff --git a/src/Resources/DynamoCore/LargeIcons/AnyFalse.Large.png b/src/Resources/DynamoCore/LargeIcons/AnyFalse.Large.png
new file mode 100644
index 00000000000..587ab052a32
Binary files /dev/null and b/src/Resources/DynamoCore/LargeIcons/AnyFalse.Large.png differ
diff --git a/src/Resources/DynamoCore/LargeIcons/AnyTrue.Large.png b/src/Resources/DynamoCore/LargeIcons/AnyTrue.Large.png
new file mode 100644
index 00000000000..9d8b5855368
Binary files /dev/null and b/src/Resources/DynamoCore/LargeIcons/AnyTrue.Large.png differ
diff --git a/src/Resources/DynamoCore/SmallIcons/AnyFalse.Small.png b/src/Resources/DynamoCore/SmallIcons/AnyFalse.Small.png
new file mode 100644
index 00000000000..f87b41c4b34
Binary files /dev/null and b/src/Resources/DynamoCore/SmallIcons/AnyFalse.Small.png differ
diff --git a/src/Resources/DynamoCore/SmallIcons/AnyTrue.Small.png b/src/Resources/DynamoCore/SmallIcons/AnyTrue.Small.png
new file mode 100644
index 00000000000..84027b30035
Binary files /dev/null and b/src/Resources/DynamoCore/SmallIcons/AnyTrue.Small.png differ
diff --git a/test/DynamoCoreTests/Nodes/ListTests.cs b/test/DynamoCoreTests/Nodes/ListTests.cs
index d0be638d624..b85456dbc32 100644
--- a/test/DynamoCoreTests/Nodes/ListTests.cs
+++ b/test/DynamoCoreTests/Nodes/ListTests.cs
@@ -2102,6 +2102,46 @@ public void TrueForAll_SimpleTest()
#endregion
+ #region Test AnyTrue
+
+ [Test]
+ public void AnyTrue_SimpleTest()
+ {
+ string openPath = Path.Combine(TestDirectory, @"core\list\AnyTrue_SimpleTest.dyn");
+ RunModel(openPath);
+
+ // check all the nodes and connectors are loaded
+ Assert.AreEqual(6, CurrentDynamoModel.CurrentWorkspace.Nodes.Count());
+ Assert.AreEqual(5, CurrentDynamoModel.CurrentWorkspace.Connectors.Count());
+ AssertPreviewValue("eb32799e0a26444081185a072e5c1c44", true);
+ AssertPreviewValue("dfc0430372ea40cb9b57c34551da69a6", false);
+ AssertPreviewValue("3391f6711c8d482eab224c881d512f73", true);
+ AssertPreviewValue("cfdc4008ae544881b80b0d2b807770e7", true);
+ AssertPreviewValue("2f20ee45e15149859b9e2d4548673079", true);
+ }
+
+ #endregion
+
+ #region Test AnyFalse
+
+ [Test]
+ public void AnyFalse_SimpleTest()
+ {
+ string openPath = Path.Combine(TestDirectory, @"core\list\AnyFalse_SimpleTest.dyn");
+ RunModel(openPath);
+
+ // check all the nodes and connectors are loaded
+ Assert.AreEqual(6, CurrentDynamoModel.CurrentWorkspace.Nodes.Count());
+ Assert.AreEqual(5, CurrentDynamoModel.CurrentWorkspace.Connectors.Count());
+ AssertPreviewValue("d18e50739b14411fac8b3115698ec655", false);
+ AssertPreviewValue("23e3c4f0a0ca429fab26a54515d98e7a", true);
+ AssertPreviewValue("e02a84cc887a43b8b8fa31db4553ae84", false);
+ AssertPreviewValue("7830af415719453a98b40538ced2144b", true);
+ AssertPreviewValue("a4478dae1ecb4a879456f590c7717a8d", true);
+ }
+
+ #endregion
+
#region Test Join List -PartiallyDone
[Test]
diff --git a/test/Libraries/CoreNodesTests/ListTests.cs b/test/Libraries/CoreNodesTests/ListTests.cs
index 1c6635b4c5c..e6c0980e4f1 100644
--- a/test/Libraries/CoreNodesTests/ListTests.cs
+++ b/test/Libraries/CoreNodesTests/ListTests.cs
@@ -581,6 +581,46 @@ public static void ListCount()
Assert.AreEqual(3, List.Count(new ArrayList { 0, 1, 2 }));
}
+ [Test]
+ [Category("UnitTests")]
+ public static void ListAnyTrue()
+ {
+ var oneTrue = new List