Looking for exact numbers in list



how I get only the exact matching nummers from the list? now i get the number 254 and 255 too. but i only want the numbers 54 and 55



Maybe add an equal node to it?

Have no computer arround here so can’t test it


As vanlion says, use the == node :slight_smile:

You can try something like this:


Also, those are strings not numbers. Converting tour data to the correct type will save you some headaches.


I think that the issue presented here by @royboverhoff is that he would like to get only parts of a string but the logic used in “string.contains” is that 254 contain 54 etc. so in order to solve your problem Roy you’d have to look at the length of the string or even better work with numbers if this is in fact what the stringlist is.

It would be nice to see what your stringlist contain as it is not element id’s as a lot of your “in” outputs of boolmask does not contain either 54 or 55.


You could try, starts with instead of trying to get the entire strings?

That is unless there are not number like 540 or 550!!!


Why not filter out the numbers based on the length to start with?


Try this in a code block :wink:

input==54 ?
input==55 ?

or for a string

input==“54” ?
input==“55” ?


I think @Ewan_Opie has both the easiest and most elegant solution here.


its same


Personal preference is designscript for simplicity, but OOTB is perfectly capable, nice one @til.shviger :grinning: