If statement not working


#1

Hello, My if statements arent working. What am i doing wrong?


#2

The If node can’t handle Empty Lists. You’ll need to use something else. Null works fine.


#3

I still cant seem to get it to work, even with nulls. I also tried 0. :confused:


#4

Your False input is still an Empty List. You can’t have any Empty List inputs in that node.


#5

yeah but thats a string. How else… am is supposed to get it by passed? I am trying to write a conditional statement for what it should do if that node comes up empty. Is that not possible?


#6

It’s not actually a string. String from Object needs an actual object to run on. It’s returning Empty List because there’s no objects to convert. Use List.IsEmpty to determine if you have an Empty List or not.


#7

I am doing that in the nodes just above, but I need to take the value from that node when it is not listed. Try it out for your self you will see what I am talking about. I need to manage that empty list some how.


#8

The problem is your False input. It’s an Empty List. You can’t convert it to a string, you’ll have to manually type it out.

The warning is because of the Empty Lists, but it will still function correctly.