Automating Filter Creation

Hello everyone!, this is my first post here so apparently I can only upload one image and I have got a question about a script I made, the purpose of this script is to create View Filters, I attached an image of the Script, and it works fine with Instance Parameters, which is great but I’d also like it to work with Type Parameters, does anyone have a sugestion to fix this issue?

When I try to do the same thing with a Type Parameter, an error shows up “Object reference not set to an instance of an object” in the last two nodes, does anyone know if there’s a way around it?, a way to fix the script or maybe it has to be a different script for Type Parameters?

Thanks in advance!

I’ve promoted your user level so you can post additional images. Can you show an image of the failing scenario (with all node preview bubbles pinned)? You need to get the type parameter from the type element. The instance would return a null that’s likely giving you the error.

Thanks Nick! I found an answer in another topic, I’ll upload an image of the result, I’ll use the first Script for Insance Parameters and this one for Type Parameters.