Why is a List output from a ZTN showing as a Function?

This makes no sense to my (newbie) brain, so I’m hoping someone can explain. Here’s my ZTN that clearly outputs a Data[], but at the bottom it says its result is Function. This Function is just giving me problems everywhere because I get warnings about how Function doesn’t have this or that method or property. So why is it saying it’s a Function and not a List?
ListIsFunction

Image isn’t loading, but this usually means that your node is missing an input, or that a default value hasn’t been assigned.

sharing your code in a github repo or gist is the way to get this solved.
Also note your dynamo version, etc.

1 Like

Yep, I found that out a few minutes ago in the github doc of dynamo, of all places. I had an unassigned input. Thanks!! (https://github.com/DynamoDS/Dynamo/wiki/How-To-Create-Your-Own-Nodes)

(Seems like Dynamo could have a more useful response to a missing input than declaring the output a function.)

Andy

when you partially apply the inputs ( set some inputs to a value) you’re creating a version of your node which has some inputs held constant -

check out:
https://primer.dynamobim.org/06_Designing-with-Lists/6-3_lists-of-lists.html
(look at the section on list.map)
or maybe
https://dynamobim.org/pt-2-higher-order-functions-or-using-our-custom-node-over-multiple-lists/

1 Like

a quick google returned this, which seems to explain functions in Dynamo from a starting point:

1 Like

This is actually VERY useful. Look into function nodes such as Function.Compose and List.Map.

1 Like

I will, thanks. I just mean, UI-wise, like lighting up an empty mandatory connection with a warning color and an explanatory rollover.

Andy

That could get very annoying if you’re using functions. Usually it’s pretty obvious if you’re missing an input because… well there’s no input. And nodes actually do have a visual change when they’re missing a necessary input.
image
The top node is set to use the default value for ignoreCase while the bottom one isn’t.

ZTN inputs with default values don’t need an attached input, though, so you can’t tell you’re missing a mandatory input. Except that the title bar of the node is lighter gray, no msg why or anything, which isn’t intuitive. Esp if you have 10 inputs mostly with
defaults (which I did), you don’t know to look for a missing mandatory input because they look the same as the unconnected ones with defaults.

Yep, once you know all this, you don’t care, but being a noob, that really cost some time.

Andy

It’s all just a matter of experience and taking the time to learn things. You can’t know everything right off the bat.

I do think - that ports with default values should be visually distinct - a long running request.

Just thinking out loud here, but it would be nice to extend this to valid inputs for each port. So if a port has an input (with a valid object type for that port) or a default value it shows one way vs if the port is missing an input or has a missmatched object type.

Yeah, that would be great!

Andy