Boolean value show false always

Trying to get someone help
I am trying to compare two list (both are element ID ),but I wonder why the result show out always is false?(I already check that the id I want to compare is inside another list) . I also try the list in contain before, but the result still the same.

Hi @105302066,

Can you use List.Contains node instead of Contains node?

-Biboy

Thanks for your help ,but I try that also, it still cannot show true answer .For example element id 289950 at 103 ,you can see the result is still false

are the same values have the same type ? integer ?

1 Like

Thank you too ,but I try that before, it doesn’t work.

Sorry, I try myself but I can’t find out what type the number belong to. One of the is the element id I get in select model element ,another is the element id I read from the excel(the data in excel is from the same revit project that I export by schedule)

Likely this is mismatched data types.

Use an Object.Type node to confirm one set of nodes isn’t a string and the other an integer. If the types don’t match, convert one value using a String.ToNumber or a String.FromObject node.

2 Likes

Hi hi,I try to use object.type connect to them by both of them show the other type of data or warning, so I think they both are not the string and therefore cannot use string.to number or a string.fromobject. So I wonder if I change the data load from excel to element id by node change parameter to element id, can it work?
If that can, how should I input the data ?

try to convert them both to string by stringFromObj node, then do what you want then turn them back to number by ToNumber node

1 Like

Is there any trailing whitespace you need to filter out?

Why not try something like this:


I know that values are not the same as yours, i just dont get why would you use List.Map

2 Likes

I use that before ,but it doesn’t work because the data does not belong to same data type.

Thanks guys. I did it .At first ,I find out that one data is in integer type and the other is in double type , so I use the node math.round to convert the integer value to double value and it workedBut anyway, thanks for you guys help.

1 Like