IF node broken?

See the picture below;

I’ve used the IF node and fed it 2 lists and a boolean.
The Boolean returns true, so the first list should be returned.
Before the list goes into the IF-node it has 10 items, after it comes out it only has 9 items. Where did the last item go?

It’s caused by the lacing. The if node has shortes lacing as default, and it can’t be changed. Try the scopif or a simple python script.

if IN[0]:
	OUT = IN[1]
else:
	OUT = IN[2]
1 Like

The behavior was changed in this PR:

Additional notes:

  • With a formula node you can change lacing.
  • Design Script if behaves the same way as the if node.

Thanks for your reply Einar,

I’ve tried this solution and i’m even more surprised now… this time it misses 2 items in my List.

Hello, could you please tell what is tested with String.Contains?

@M.Melching right click the Formula node and choose longes lacing.

1 Like

In principle, it works:

This was the right answer. Well, it was the lacing. It chose the shortest list as lacing. Thanks for solving this