Help returning FALSE rather then an error when using FIND function

Hi,

I’m wondering if anyone knows a way to return FALSE or TRUE rather than just TRUE when using a find function. The function returns a ‘not found’ error and I can’t for the life of me find a workaround.

I have attached an example model and would appreciate any help or enlightenment!

1 Like

BLOCK.skp (106.7 KB)

1 Like

To avoid the error always add the item you want to find at the end of the string

ast = “ZZZ”
find(“T”,ast,1) will be an error
find(“T”, ast & “T”,1) returns 4, which is > greater than len(ast) so use this to figure your code

1 Like

Makes perfect sense now, thanks so much