Misunderstanding with True/False List Return on Randomization Script

Hello Dynamo Community,

New Dynamo user here. In Revit 2020.2, I’m writing a script that randomizes the types of curtain wall panels from a single curtain wall panel family. The panel family has 17 types, each with the name “Type X,” so I set a rule to return true for any curtain wall panel with “Type” in the name.

I got this script to work as intended in a sandbox file of Revit, but when I test the script in a detached model, my true/false return does not work correctly (see attached image).

I’m so new to Dynamo that it wouldn’t surprise me if it’s a basic syntax or logic error, so any help or direction is much appreciated. For additional context, I wrote this script based on this walkthrough from Revit Experiments on YouTube.

Randomization Script Walkthrough - YouTube

Many thanks in advance!

After some monkeying around, I found a node that works correctly for this application! (see attached)

I’m still not sure why the previous node behaved like it did–maybe how the script read “Type” as a term or a function rather than a string? Good consideration for future scripts.